jmx (Source)

When To Use

Use jmx for Java-based products exposing metrics through MBeans.

This source is central for JVM/database connectors such as Cassandra.

Syntax

sources:
  cacheRequests:
    type: jmx
    objectName: org.apache.cassandra.metrics:type=Cache,scope=*,name=Requests
    attributes:
    - Count
    keyProperties:
    - scope

Properties

Property Required Default Description
type Yes None jmx.
objectName Yes None MBean ObjectName pattern.
attributes Conditionally [] Attribute names to fetch.
keyProperties Conditionally [] ObjectName key properties to emit as extra columns.
resultContent No Runtime-dependent Compatibility property in schema snapshots; usually not needed for JMX source declarations.
executeForEachEntryOf No None Fan-out execution context.
computes No [] Post-processing pipeline.
forceSerialization No false Serialize execution via a per-connector, per-host lock (see the Sources overview). Default false.

At least one of attributes or keyProperties must be non-empty.

  • Keep one logical metric family per source.
  • Use wildcard ObjectNames (scope=*) plus keyProperties for multi-instance monitors.
  • Normalize units in computes (divide, multiply) before mapping.

Common Mistakes

  • Fetching too many attributes in one source.
  • Ignoring ObjectName dimensions and losing instance identity.
  • Relying on unstable attribute naming across product versions without fallback.

Community Examples

jmx source mbeans objectName keyProperties metricshub community connector hardware system
Links:
  • [1] https://github.com/metricshub/community-connectors/blob/main/src/main/connector/database/Cassandra/Cassandra.yaml
Searching...
No results.