Skip to content

Commit

Permalink
Hook up nats prometheus metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
snormore committed Aug 31, 2023
1 parent 259b97b commit bd8f9ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions dev/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,24 @@ services:
ports:
- 14222:4222
command: "--cluster_name NATS --cluster nats://0.0.0.0:6222 -m 8222 --routes=nats://ruser:T0pS3cr3t@nats-1:6222,nats://ruser:T0pS3cr3t@nats-2:6222,nats://ruser:T0pS3cr3t@nats-3:6222"
nats-1-metrics:
image: natsio/prometheus-nats-exporter:latest
command: "--varz http://nats-1:8222"
ports:
- 17777:7777
nats-2:
image: nats
command: "--cluster_name NATS --cluster nats://0.0.0.0:6222 -m 8222 --routes=nats://ruser:T0pS3cr3t@nats-1:6222,nats://ruser:T0pS3cr3t@nats-2:6222,nats://ruser:T0pS3cr3t@nats-3:6222"
ports:
- 24222:4222
nats-2-metrics:
image: natsio/prometheus-nats-exporter:latest
command: "--varz http://nats-2:8222"
nats-3:
image: nats
command: "--cluster_name NATS --cluster nats://0.0.0.0:6222 -m 8222 --routes=nats://ruser:T0pS3cr3t@nats-1:6222,nats://ruser:T0pS3cr3t@nats-2:6222,nats://ruser:T0pS3cr3t@nats-3:6222"
ports:
- 34222:4222
nats-3-metrics:
image: natsio/prometheus-nats-exporter:latest
command: "--varz http://nats-3:8222"
8 changes: 4 additions & 4 deletions dev/docker/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ scrape_configs:
- job_name: prometheus
static_configs:
- targets:
- 'host.docker.internal:8009'
- nats-1:8222
- nats-2:8222
- nats-3:8222
- host.docker.internal:8009
- nats-1-metrics:7777
- nats-2-metrics:7777
- nats-3-metrics:7777

0 comments on commit bd8f9ec

Please sign in to comment.