Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


The jmx2munin project exposes JMX MBean attributes to Munin. Some of it's features:

  • strictly complies to the plugin format
  • exposes composite types like Lists, Maps, Set as useful as possible
  • String values can be mapped to numbers

How to use

This is what the Munin script will call. So you should test this first. Of course with your parameters. This example expose all Cassandra information to Munin.

java -jar jmx2munin.jar \
     -url service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi \
     -query "org.apache.cassandra.*:*"

The "url" parameters specifies the JMX URL, the query selects the MBeans (and optionally also the attributes) to expose.

java -jar jmx2munin.jar \
     -url service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi \
     -query "org.apache.cassandra.*:*" \
     -attribute org_apache_cassandra_db_storageservice_livenodes_size

The script that does the actual interaction with munin you can find in the contrib section. It's the one you should link in the your Munin plugin directory.

:/etc/munin/plugins$ ls -la cassandra_*
lrwxrwxrwx 1 root root 37 2011-04-07 19:58 cassandra_nodes_in_cluster -> /usr/share/munin/plugins/

In the plugin conf you point to the correct configuration

env.url service:jmx:rmi:///jndi/rmi://
env.query org.apache.cassandra.*:*

env.config cassandra/nodes_in_cluster

A possible configuration could look like this

graph_title Number of Nodes in Cluster
graph_vlabel org_apache_cassandra_db_storageservice_livenodes_size
org_apache_cassandra_db_storageservice_livenodes_size.label number of nodes

The script will extract the attributes from the config and caches the JMX results to reduce the load when showing many values. For testing you can run it manually just like munin would.


More advanced

Sometimes it can be useful to track String values by mapping them into an enum as they really describe states. To find this possible candidates you can call:

java -jar jmx2munin.jar \
     -url service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi \
     -query "org.apache.cassandra.*:*" \

It should output a list of possible candidates. This can now be turned into a enum configuration file:

0 = ^Normal
1 = ^Client
2 = ^Joining
3 = ^Bootstrapping
4 = ^Leaving
5 = ^Decommissioned
6 = ^Starting drain
7 = ^Node is drained

Which you then can provide:

java -jar jmx2munin.jar \
     -url service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi \
     -query "org.apache.cassandra.*:*" \
     -enums /path/to/enums.cfg

Now matching values get replaced by their numerical representation. On the left needs to be a unique number on the right side is a regular expression. If a string cannot be matched according to the spec "U" for "undefined" will be returned.


Licensed under the Apache License, Version 2.0 (the "License") You may obtain a copy of the License at


Export JMX information to Munin






No packages published

Contributors 4