Collects JMX metrics from the Jolokia Agent. Jolokia is an HTTP bridge that provides access to JMX MBeans without the need to write Java code. See the Reference Guide for more information.

By default, all MBeans will be queried for metrics. All numerical values will be published to Graphite; anything else will be ignored. JolokiaCollector will create a reasonable namespace for each metric based on each MBeans domain and name. e.g) java.lang:name=ParNew,type=GarbageCollector would become java.lang.name_ParNew.type_GarbageCollector.


  • Jolokia
  • A running JVM with Jolokia installed/configured

Example Configuration

If desired, JolokiaCollector can be configured to query specific MBeans by providing a list of mbeans. If mbeans is not provided, all MBeans will be queried for metrics. Note that the mbean prefix is checked both with and without rewrites (including fixup re-writes) applied. This allows you to specify "java.lang:name=ParNew,type=GarbageCollector" (the raw name from jolokia) or "java.lang.name_ParNew.type_GarbageCollector" (the fixed name as used for output)

If the regex flag is set to True, mbeans will match based on regular expressions rather than a plain textual match.

The rewrite section provides a way of renaming the data keys before it sent out to the handler. The section consists of pairs of from-to regular expressions. If the resultant name is completely blank, the metric is not published, providing a way to exclude specific metrics within an mbean.

    host = localhost
    port = 8778
    mbeans = "java.lang:name=ParNew,type=GarbageCollector",
    java = coffee
    "-v\d+\.\d+\.\d+" = "-AllVersions"
    ".*GetS2Activities.*" = ""


Setting Default Description Type
byte_unit byte Default numeric output(s) str
domains Pipe delimited list of JMX domains from which to collect stats. If not provided, the list of all domains will be downloaded from jolokia.
enabled False Enable collecting these metrics bool
host localhost Hostname str
jolokia_path None Path to jolokia. typically "jmx" or "jolokia". Defaults to the value of "path" variable. NoneType
mbeans , Pipe delimited list of MBeans for which to collect stats. If not provided, all stats will be collected. list
measure_collector_time False Collect the collector run time in ms bool
metrics_blacklist None Regex to match metrics to block. Mutually exclusive with metrics_whitelist NoneType
metrics_whitelist None Regex to match metrics to transmit. Mutually exclusive with metrics_blacklist NoneType
password None Password for authentication NoneType
path jolokia Path component of the reported metrics. str
port 8778 Port int
regex False Contols if mbeans option matches with regex, False by default. bool
rewrite , This sub-section of the config contains pairs of from-to regex rewrites. list
use_canonical_names True Whether property keys of ObjectNames should be ordered in the canonical way or in the way that they are created. The allowed values are either "True" in which case the canonical key order (== alphabetical sorted) is used or "False" for getting the keys as registered. Default is "True bool
username None Username for authentication NoneType

Example Output 2 219 73400320 73400320 73400320 5146840 23920640 21757952 85983232 23796992 2686976 2555904 50331648 2600768 25165824 25165824 25165824 25165824 3145728 3145728 3145728 414088 14259063