(prometheus) Add in-docker prometheus instance to exfiltrate metrics from the docker-based services
This commit is contained in:
parent
9f7df59945
commit
116595d218
@ -8,10 +8,8 @@ x-svc: &service
|
||||
- logs:/var/log/wmsa
|
||||
networks:
|
||||
- wmsa
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
|
||||
labels:
|
||||
- "__meta_docker_port_private=7000"
|
||||
x-p1: &partition-1
|
||||
env_file:
|
||||
- "run/env/service.env"
|
||||
@ -201,6 +199,18 @@ services:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
networks:
|
||||
- wmsa
|
||||
prometheus:
|
||||
image: "prom/prometheus"
|
||||
container_name: "prometheus"
|
||||
command:
|
||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
||||
ports:
|
||||
- "127.0.0.1:8091:9090"
|
||||
volumes:
|
||||
- "./run/prometheus.yml:/etc/prometheus/prometheus.yml"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
networks:
|
||||
- wmsa
|
||||
networks:
|
||||
wmsa:
|
||||
volumes:
|
||||
|
13
run/prometheus.yml
Normal file
13
run/prometheus.yml
Normal file
@ -0,0 +1,13 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: docker
|
||||
docker_sd_configs:
|
||||
- host: unix:///var/run/docker.sock
|
||||
relabel_configs:
|
||||
- source_labels:
|
||||
- '__meta_docker_network_ip'
|
||||
target_label: '__address__'
|
||||
replacement: '$1:7000'
|
Loading…
Reference in New Issue
Block a user