Monitor JMX metrics
With Site24x7 APM Insight, you can track Java Management Extensions (JMX) metrics.
Although we monitor and enhance application performance using transaction metrics and traces, it is equally important to monitor the environment where your application is running. Monitoring JMX metrics helps you gain additional insights.
Default JMX metrics
By default, JMX metrics are captured from Site24x7 APM Insight agent version 5.0, and can be viewed under App parameters. Since JMX metrics are specific to app servers, metrics captured by default in various servers are listed below.
Metrics | Tomcat | JBoss As | WildFly | GlassFish | WebLogic | WebSphere AS | WebSphere Liberty profile | Jetty |
Session | Y | Y | Y | Y | Y | Y | ||
Data Source |
Y |
Y | Y | |||||
Thread pool | Y | Y | Y | Y | Y | Y | Y | |
Transactions (JTA) | Y | Y | Y | Y | Y | |||
Buffer Pool | Y | Y | Y | Y | Y | Y | Y | Y |
File Descriptor Count | Y | Y | Y | Y | Y | Y | Y | Y |
To enable capturing of JMX metrics,
- Log into your Site24x7 account.
- Navigate to APM Insight app > Edit configuration.
- Configuration Profile > Edit APM agent configuration profile > Background transactions.
- Enable the Capture JMX metrics? check box.
- To view the metrics, navigate to the App parameters tab.
Custom JMX metrics
Apart from the default metrics, you can also capture additional metrics by following the below given steps:
- Create a new file jmx_extensions.conf in agent directory.
- Add the JMX query with the syntax.
query_name name_of_metric comma_separated_attributes
- You can add wildcard (*) to the queries.
- You can also use the keys for naming the metrics by enclosing them with {}.
- Add each JMX in a new line
Examples:
- java.lang:type=OperatingSystem java.lang OpenFileDescriptorCount
Agent monitors attribute OpenFileDescriptorCount and it will be named as java.lang-OpenFileDescriptorCount. - java.nio:type=BufferPool,name=* java.nio-BufferPool-{name} MemoryUsed, TotalMemory
The result of above query is that the agent monitors all the beans under the Buffer Pool and will monitor the attributes memory used and total memory. This will be named a java.nio-BufferPool-Direct-MemoryUsed, etc.
Spaces in the query name should be escaped with a backslash(\) before them so that the agent can properly parse the entire query string. In the below example, the whitespace between Pool and (HikariPool-1) has been escaped because "Pool (HikariPool-1)" is a complete name in itself.
com.zaxxer.hikari:type=Pool\ (HikariPool-1) com.zaxxer.hikari.Pool ActiveConnections, TotalConnections
Disable JMX metrics
If you want to disable tracking JMX metrics, disable the checkbox Capture JMX metrics, under the APM agent configuration profile, in the Edit agent configuration.
-
On this page
- Default JMX metrics
- Custom JMX metrics
- Disable JMX metrics