remove unnecessary default monitoring tools due to weirtd load characteristics on small machines

This commit is contained in:
Sebastian
2024-12-22 07:03:25 +01:00
parent e0887aff53
commit 7291c047ad
3 changed files with 81 additions and 0 deletions

23
cadvisor.yml Normal file
View File

@@ -0,0 +1,23 @@
services:
cadvisor:
image: ${CADVISOR_IMAGE:-gcr.io/cadvisor/cadvisor:v0.49.1}
container_name: cadvisor
privileged: true
devices:
- /dev/kmsg:/dev/kmsg
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
#- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux
restart: unless-stopped
expose:
- 8080
labels:
- "prometheus-scrape.enabled=true"
- "prometheus-scrape.port=8080"
- "prometheus-scrape.job_name=cadvisor"
- "org.label-schema.group=monitoring"
networks:
- monitoring

23
nodeexporter.yml Normal file
View File

@@ -0,0 +1,23 @@
services:
nodeexporter:
image: prom/node-exporter:v1.2.2
container_name: nodeexporter
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.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
restart: unless-stopped
expose:
- 9100
labels:
- "prometheus-scrape.enabled=true"
- "prometheus-scrape.port=9100"
- "prometheus-scrape.job_name=nodeexporter"
- "org.label-schema.group=monitoring"
networks:
- monitoring

35
prometheus.yml Normal file
View File

@@ -0,0 +1,35 @@
services:
prometheus:
image: prom/prometheus:v2.30.3
container_name: prometheus
volumes:
- ./prometheus/prometheus-autodiscover.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus:rw
- prometheus-docker-sd:/prometheus-docker-sd:ro
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
restart: unless-stopped
labels:
org.label-schema.group: "monitoring"
depends_on:
- prometheus-docker-sd
- wireguard
network_mode: "service:wireguard"
prometheus-docker-sd:
image: "stucky/prometheus-docker-sd:latest"
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- prometheus-docker-sd:/prometheus-docker-sd:rw
### VOLUMES
volumes:
prometheus_data:
prometheus-docker-sd: