Files
akvorado/docker/jmx-exporter-download.sh
Vincent Bernat 872bda0501 docker: switch to Prometheus Java Agent exporter for Kafka
This removes the last Bitnami image. This has been some time that
Bitnami was starting to be hostile, but this recently became even worse:
https://github.com/bitnami/containers/issues/83267.

Moreover, this is the recommended way to export JMX metrics to
Prometheus.
2025-07-27 21:44:28 +02:00

18 lines
468 B
Bash
Executable File

#!/bin/sh
set -e
VERSION=1.3.0
NAME=jmx_prometheus_javaagent-${VERSION}.jar
URL=https://github.com/prometheus/jmx_exporter/releases/download/${VERSION}/${NAME}
cd /opt/jmx-exporter
# Check if target version already exist
[ ! -s jmx_prometheus_javaagent-${VERSION}.jar ] || exit 0
# Retrieve it
apk add --no-cache curl
curl --retry 10 --retry-connrefused --remove-on-error --remote-name --fail --silent --location $URL
ln -vsf ${NAME} jmx_prometheus_javaagent.jar