From: Kai Moritz Date: Fri, 4 Aug 2023 20:18:53 +0000 (+0200) Subject: Fixed the `jmx_prometheus_javaagent` X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=f499788fcce2a8709ddceec7e23bbfc352ebe45f;p=demos%2Fkafka%2Fmonitoring Fixed the `jmx_prometheus_javaagent` --- 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