[ 
https://issues.apache.org/jira/browse/IGNITE-28885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Egor Baranov updated IGNITE-28885:
----------------------------------
    Description: 
*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

  was:
 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


>  Add JMX Prometheus Exporter to Ducktests for JVM Memory/GC Monitoring
> ----------------------------------------------------------------------
>
>                 Key: IGNITE-28885
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28885
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Egor Baranov
>            Assignee: Egor Baranov
>            Priority: Major
>
> *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 message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to