From f499788fcce2a8709ddceec7e23bbfc352ebe45f Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 4 Aug 2023 22:18:53 +0200 Subject: [PATCH] Fixed the `jmx_prometheus_javaagent` --- docker-compose.yml | 3 +++ kafka/Dockerfile | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 542ee1d..bd2c743 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,7 @@ services: environment: KAFKA_ENABLE_KRAFT: 'false' KAFKA_OPTS: + -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false @@ -43,6 +44,7 @@ services: environment: KAFKA_ENABLE_KRAFT: 'false' KAFKA_OPTS: + -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false @@ -73,6 +75,7 @@ services: environment: KAFKA_ENABLE_KRAFT: 'false' KAFKA_OPTS: + -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false diff --git a/kafka/Dockerfile b/kafka/Dockerfile index 7c6cc74..660587d 100644 --- a/kafka/Dockerfile +++ b/kafka/Dockerfile @@ -1,9 +1,7 @@ FROM bitnami/kafka:3.4.0 ADD jmx-exporter-config.yml /opt/prometheus/config.yml -ADD https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.17.2/jmx_prometheus_javaagent-0.17.2.jar /opt/prometheus/jmx_prometheus_javaagent.jar +ADD https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.19.0/jmx_prometheus_javaagent-0.19.0.jar /opt/prometheus/jmx_prometheus_javaagent.jar USER root RUN chmod -R 777 /opt/prometheus USER 1001 - -ENV KAFKA_OPTS=-javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -- 2.20.1