EgorBaranovEnjoysTyping opened a new pull request, #13362:
URL: https://github.com/apache/ignite/pull/13362
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]