Prometheus JMX exporter

To enable out-of-band JVM monitoring with the Minion process, set PROM_JMX_EXPORTER_ENABLED=true. The exporter listens on port 9299 by default; use PROM_JMX_EXPORTER_PORT to override this.

The container ships a default configuration at /opt/prom-jmx-exporter/config.yaml. To supply a custom configuration, mount your file over that path or point PROM_JMX_EXPORTER_CONFIG to a different path inside the container.

The default configuration covers basic JMX metrics. If you need custom JMX rules, inject your own config.yaml file rather than relying on the default.

The default configuration file looks like the following:

startDelaySeconds: 10
lowercaseOutputName: true
lowercaseOutputLabelNames: true
autoExcludeObjectNameAttributes: true

includeObjectNames:
  - "java.lang:*"
  - "org.opennms.*:*"
  - "kafka.producer:*"
  - "org.apache.camel:*"

rules:
  - pattern: "java.lang.*"
  - pattern: "kafka.producer.*"
  - pattern: "org.apache.camel.*"
  - pattern: org\.opennms\..+\.(.+)<name=(.+)><>Value
    name: minion_$1_$2
    type: GAUGE

  - pattern: org\.opennms\..+\.(.+)<name=(.+)><>Count
    name: minion_$1_$2_count
    type: COUNTER

  - pattern: org\.opennms\..+\.(.+)<name=(.+)><>(\d+)thPercentile
    name: minion_$1_$2
    type: GAUGE
    labels:
      quantile: "0.$3"