Prometheus
This page provides instructions to set up Prometheus Server to scrape metrics from JMS Bridge, which already runs a Prometheus agent on port 8888
.
- Download and extract Prometheus from the official site:
wget https://github.com/prometheus/prometheus/releases/download/v2.51.2/prometheus-2.51.2.linux-amd64.tar.gztar -xvf prometheus-2.51.2.linux-amd64.tar.gzcd prometheus-2.51.2.linux-amd64
- Edit
prometheus.yml
to add JMS Bridge target:
global: scrape_interval: 15s
scrape_configs: - job_name: "jms-bridge" static_configs: - targets: ["localhost:8888"]
- Start Prometheus:
./prometheus --config.file=prometheus.yml
- Open your browser and go to:
http://localhost:9090
- Navigate to Status → Targets and confirm that
jms-bridge
is listed and marked as UP.
- Create a custom
prometheus.yml
file on your host with the following content:
global: scrape_interval: 15s
scrape_configs: - job_name: "jms-bridge" static_configs: - targets: ["host.docker.internal:8888"]
- Run Prometheus server using this config:
docker run -d \ -p 9090:9090 \ -v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml \ --name prometheus \ prom/prometheus
- Visit:
http://localhost:9090
- Go to Status → Targets and verify that the
jms-bridge
job is healthy.
No Additional JMS Bridge Configuration Needed
Section titled “No Additional JMS Bridge Configuration Needed”You only need to point your Prometheus server to localhost:8888
or the appropriate IP/hostname.