monitoring: сетевой дашборд + node-exporter в host-network (видит eth0/wg0)
This commit is contained in:
@@ -15,6 +15,8 @@ services:
|
||||
- ./prometheus/targets:/etc/prometheus/targets:ro
|
||||
- ./prometheus/rules:/etc/prometheus/rules:ro
|
||||
- prometheus_data:/prometheus
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
ports:
|
||||
- '127.0.0.1:9090:9090'
|
||||
networks: [monitoring]
|
||||
@@ -48,10 +50,13 @@ services:
|
||||
networks: [monitoring]
|
||||
depends_on: [prometheus]
|
||||
|
||||
# node-exporter в host-network: видит реальные интерфейсы хоста (eth0, wg0, tun…).
|
||||
# Слушает host:9100; доступ ограничен ufw (только docker-сети). Скрейпится через host.docker.internal.
|
||||
node-exporter:
|
||||
image: prom/node-exporter:latest
|
||||
container_name: node-exporter
|
||||
hostname: fr1
|
||||
network_mode: host
|
||||
pid: host
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- '--path.procfs=/host/proc'
|
||||
@@ -62,8 +67,6 @@ services:
|
||||
- /proc:/host/proc:ro
|
||||
- /sys:/host/sys:ro
|
||||
- /:/rootfs:ro
|
||||
pid: host
|
||||
networks: [monitoring]
|
||||
|
||||
cadvisor:
|
||||
image: gcr.io/cadvisor/cadvisor:latest
|
||||
|
||||
Reference in New Issue
Block a user