Prometheus JMX Exporter
Setup Prometheus JMX Exporter and send metrics to Apica Ascent endpoint
rules:
- pattern: ".*"java -javaagent:./jmx_prometheus_javaagent-0.17.2.jar=12345:config.yaml -jar yourJar.jar# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
labels:
group: 'ascent_engr'
cluster_id: 'ascent'
namespace: 'engr'
- job_name: 'java_metrics' # <------- Added configuration for scraping localhost:12345/metrics --------
static_configs:
- targets: ['localhost:12345']
labels:
group: '<GROUP NAME>'
cluster_id: '<CLUSTER ID>'
namespace: '<NAMESPACE>'Last updated
Was this helpful?