Java Virtual Machine
This comprehensive Java Virtual Machine monitoring dashboard is the result of many years efforts learning about monitoring and instrumenting Java applications for observability (among other things). You'll note some interesting things above and beyond the standard metrics which are Garbage Collection throughput, memory pools, and some nice graphs allowing for analysis of GC, thread states, and memory pools and bio buffer pool. You'll even find an overview and use of this dashboard on my YouTube channel. https://youtu.be/27Yc3gdeuQ0?si=zXXFy26k7iplBRrN
The following JMX Exporter configuration selectively collects specific relevant MBean attributes from the Java Virtual Machine. Contrary to using a wildcard pattern, this allows for specifically applying labels with things like pool names, as well as standardising on metric names across JVM versions and configurations.
You might note the commented section which I was not able to get working. Please contact me if you can help to get these two missing specific call outs working as it would allow to remove the wildcard pattern for the missing one or two essential metrics.
You’ll even find an overview and use of this dashboard on my YouTube channel. https://youtu.be/27Yc3gdeuQ0?si=zXXFy26k7iplBRrN
You will then need to either change your Java application service to include the JMX Exporter as a Java agent, or add it to the JAVA_OPTS so that the exporter with associated configuration file will be loaded with the JVM.
-javaagent:/opt/jmx_exporter/jmx_prometheus_javaagent-0.18.0.jar=9111:/opt/jmx_exporter/jmx-exporter-config.yaml
And then add the relevant Prometheus scrape configuration for the above JMX Exporter configuration. Consult the Prometheus documentation should you need to enhance it.
- job_name: 'jmx'
static_configs:
- targets: ['wer-twx-foundation:9111', 'wer-twx-iothubconnector:9111']
You’ll note the YAML list which allows adding multiple servers to scrape. You can break these out across multiple lines if you wish to apply specific application or other labels as a part of the scrape. Example:
- targets:
- simulator.japaneast.cloudapp.azure.com:9111
labels:
group: Simulators
region: Japan
- targets:
- simulator.centralus.cloudapp.azure.com:9111
labels:
group: Simulators
region: USA
- targets:
- simulator.germanywestcentral.cloudapp.azure.com:9111
labels:
group: Simulators
region: Germany
- targets:
- simulator.koreacentral.cloudapp.azure.com:9111
labels:
group: Simulators
region: Korea
Data source config
Collector config:
Upload an updated version of an exported dashboard.json file from Grafana
Revision | Description | Created | |
---|---|---|---|
Download |

Java Virtual Machine (JVM)

Easily monitor a Java virtual machine, which allows computers to run Java programs, with Grafana Cloud's out-of-the-box monitoring solution.
Learn moreGet this dashboard
Import the dashboard template
or