diff --git a/conf/prometheus.yml b/conf/prometheus.yml --- a/conf/prometheus.yml +++ b/conf/prometheus.yml @@ -15,3 +15,8 @@ static_configs: - targets: - prometheus-statsd-exporter:9102 + + - job_name: jmx-exporter + static_configs: + - targets: + - prometheus-jmx-exporter:5556 diff --git a/docker-compose.yml b/docker-compose.yml --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,9 @@ prometheus: image: prom/prometheus + depends_on: + - prometheus-statsd-exporter + - prometheus-jmx-exporter command: # Needed for the reverse-proxy - "--web.external-url=/prometheus" @@ -54,9 +57,22 @@ - "./conf/prometheus-statsd-mapping.yml:/etc/prometheus/statsd-mapping.yml:ro" restart: unless-stopped + prometheus-jmx-exporter: + image: sscaling/jmx-prometheus-exporter + environment: + JVM_OPTS: "-Djava.util.logging.config.file=/logging.properties" + volumes: + - "./conf/prometheus-jmx-exporter.yml:/opt/jmx_exporter/config.yml:ro" + - "./conf/prometheus-jmx-exporter-logging.properties:/logging.properties:ro" + ports: + - "5556:5556" + + grafana: image: grafana/grafana restart: unless-stopped + depends_on: + - prometheus environment: GF_SERVER_ROOT_URL: http://localhost:5080/grafana volumes: