All Downloads are FREE. Search and download functionalities are using the official Maven repository.

distro.lib_metrics.enable_exporter.sh Maven / Gradle / Ivy

There is a newer version: 3.0.0.CR1
Show newest version
#!/bin/bash
# To enable Prometheus JMX exporter, set JMX_EXPORTER_PORT environment variable

if [ -n "${JMX_EXPORTER_PORT}" ]; then
  JMX_EXPORTER_CONFIG=${JMX_EXPORTER_CONFIG:-"config/metrics.yml"}
  JMX_EXPORTER_AGENT_JAR=$(find lib_metrics -name "jmx_prometheus_javaagent-*.jar")
  export JAVA_OPTS="-javaagent:${JMX_EXPORTER_AGENT_JAR}=0.0.0.0:${JMX_EXPORTER_PORT}:${JMX_EXPORTER_CONFIG} ${JAVA_OPTS}"
fi




© 2015 - 2024 Weber Informatics LLC | Privacy Policy