Skip to content

IGNITE-28885 Add JMX Prometheus Exporter to Ducktests for Monitoring#13362

Open
EgorBaranovEnjoysTyping wants to merge 1 commit into
apache:masterfrom
EgorBaranovEnjoysTyping:IGNITE-28885
Open

IGNITE-28885 Add JMX Prometheus Exporter to Ducktests for Monitoring#13362
EgorBaranovEnjoysTyping wants to merge 1 commit into
apache:masterfrom
EgorBaranovEnjoysTyping:IGNITE-28885

Conversation

@EgorBaranovEnjoysTyping

Copy link
Copy Markdown
Contributor

Motivation

    Prometheus does not support the JMX protocol natively; it only scrapes metrics exposed over HTTP in its own text format. A bridge (JVM agent) is required to make JVM-level metrics accessible to Prometheus.

    This task integrates jmx_prometheus_javaagent into the ducktests framework so that every server/client node exposes JVM memory and GC metrics at :8083/metrics in Prometheus format. This enables Grafana
    dashboards that mirror the jconsole "Memory" tab (heap, non-heap, memory pools, GC collection count/time).

Changes

    1. Dockerfile (modules/ducktests/tests/docker/Dockerfile)
     - Download and install jmx_prometheus_javaagent-1.1.0.jar to /opt/jmx_exporter.jar

    2. jmx_exporter package (modules/ducktests/tests/ignitetest/services/utils/jmx_exporter/)
     - {}init{}.py — helper module with:
       - JmxExporterParams — settings from globals config (enabled, port)
       - get_jmx_exporter_params() — parse globals
       - is_jmx_exporter_enabled() — check if enabled
       - get_jmx_exporter_yml_content() — read bundled YAML content
       - jmx_agent_jvm_opt() — build -javaagent JVM option string
     - jmx_exporter.yml — rule mappings for JVM memory and GC metrics:
       - jvm_memory_heap_bytes_{used,max,committed,init}
       - jvm_memory_nonheap_bytes_{used,max,committed,init}
       - jvm_memory_pool_usage_bytes{pool,attribute}
       - jvm_memory_pool_collection_bytes{pool,attribute}
       - jvm_gc_collection_count_total{gc}
       - jvm_gc_collection_time_seconds_total{gc}

    3. ignite_spec.py (modules/ducktests/tests/ignitetest/services/utils/ignite_spec.py)
     - In __get_default_jvm_opts(): append -javaagent:/opt/jmx_exporter.jar={port}:{config_dir}/jmx_exporter.yml when jmx_exporter.enabled is true in globals

    4. ignite_aware.py (modules/ducktests/tests/ignitetest/services/utils/ignite_aware.py)
     - In init_persistent(): download jmx_exporter.jar to node if not present (idempotent: test -f || curl)
     - In _prepare_configs(): create jmx_exporter.yml in the node's config directory from bundled resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant