Fixed the `jmx_prometheus_javaagent`
authorKai Moritz <kai@juplo.de>
Fri, 4 Aug 2023 20:18:53 +0000 (22:18 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 4 Aug 2023 20:18:53 +0000 (22:18 +0200)
docker-compose.yml
kafka/Dockerfile

index 542ee1d..bd2c743 100644 (file)
@@ -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
index 7c6cc74..660587d 100644 (file)
@@ -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