feat: Add local monitoring

This commit is contained in:
William 2022-12-30 10:30:34 +01:00
parent 5e640f0d1f
commit 8cdd14b185
2 changed files with 20 additions and 0 deletions

View File

@ -61,3 +61,18 @@ services:
networks:
- web
- monitoring
nodeexporter:
image: prom/node-exporter:v1.5.0
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
networks:
- monitoring

View File

@ -5,6 +5,11 @@ global:
monitor: codelab-monitor
scrape_configs:
- job_name: 'node-local'
static_configs:
- targets:
- 'nodeexporter:9100'
- job_name: 'node'
scheme: https
basic_auth: