monitoring: сетевой дашборд + node-exporter в host-network (видит eth0/wg0)

This commit is contained in:
Ruslan Gilfanov
2026-06-21 22:45:25 +03:00
parent 61525c4400
commit 3389a76c41
4 changed files with 87 additions and 4 deletions

View File

@@ -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