Monitoring the Liberty profile
We can use the monitor-1.0 feature to monitor the server runtime environment.
To enable monitoring for the Liberty profile, we add monitor-1.0 Liberty feature in server.xml.
The monitor-1.0 feature provides monitoring support for user runtime components.
- JVM
- Web applications
- Thread pool
- Session management
- ConnectionPool
For more details, see Liberty features.
- Add the monitor-1.0 feature and the monitoring starts.
Note: If you launch the server by not using the server script (server.sh or server.bat) on a JVM, ensure that the JavaAgent is configured for JVM as given in the following example: agentlib=-javaagent:<path to liberty install>/bin/tools/ws-javaagent.jar.
- Monitoring data is reported as standard MXBeans.
- We can use JConsole to connect to JVM and look at the performance data by clicking each attribute of the MXBean.
The MXBeans for monitoring are as following:
- WebSphere:type=JvmStats
- WebSphere:type=ServletStats,name=*
- WebSphere:type=ThreadPoolStats,name=Default Executor
- WebSphere:type=SessionStats,name=*
- Websphere:type=ConnectionPool,name=*
- Optional: The same data is available with traditional PMI Mbean (Perf MBean).
Subtopics
- JVM monitoring
We can use the JvmStats MXBean for JVM monitoring in the Liberty profile.
- Web application monitoring
We can use a servlet MXBean for web application monitoring of the Liberty profile.
- ThreadPool monitoring
We can use a ThreadPool MXBean for thread pool monitoring in the Liberty profile.
- Sessions monitoring
We can use the SessionStats MXBean to monitor the performance data of sessions in the Liberty profile.
- ConnectionPool monitoring
We can use the ConnectionPool MXBean for ConnectionPool monitoring of the Liberty profile.
- Multiple components monitoring
We can filter the components to monitor using the monitor-1.0 feature in the Liberty profile. The components to be filtered must be configured in server.xml.
- HTTP access logging
We can configure access log settings for HTTP endpoints.
Tasks:
Access local and JMX REST connectors