Prometheus: Collect Systemd Metrics, make Grafana persistent
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Tobias Manske 2023-04-17 20:19:32 +02:00
parent 24d8ea09fd
commit fd589c4b36
Signed by: tobias
GPG Key ID: 9164B527694A0709

View File

@ -97,10 +97,12 @@ services:
- "GF_SECURITY_ADMIN_USER={{ grafana.admin.user }}" - "GF_SECURITY_ADMIN_USER={{ grafana.admin.user }}"
- "GF_SECURITY_ADMIN_PASSWORD={{ grafana.admin.password }}" - "GF_SECURITY_ADMIN_PASSWORD={{ grafana.admin.password }}"
volumes: volumes:
- grafana_data:/grafana
- ./grafana-ds.yml:/etc/grafana/provisioning/datasources/datasource.yml:ro,Z - ./grafana-ds.yml:/etc/grafana/provisioning/datasources/datasource.yml:ro,Z
node-exporter: node-exporter:
image: quay.io/prometheus/node-exporter:latest image: quay.io/prometheus/node-exporter:latest
container_name: host-nc-chaoswg-org-node-exporter
privileged: true privileged: true
labels: labels:
- "prometheus-scrape.enabled=true" - "prometheus-scrape.enabled=true"
@ -110,12 +112,14 @@ services:
- /sys:/host/sys:ro - /sys:/host/sys:ro
- /:/rootfs:ro - /:/rootfs:ro
- /:/host:ro,rslave - /:/host:ro,rslave
- /run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
command: command:
- '--path.rootfs=/host' - '--path.rootfs=/host'
- '--path.procfs=/host/proc' - '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys' - '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points' - '--collector.filesystem.ignored-mount-points'
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
- '--collector.systemd'
networks: networks:
- backend - backend
restart: unless-stopped restart: unless-stopped
@ -138,6 +142,7 @@ services:
volumes: volumes:
prom_data: prom_data:
grafana_data:
label_discovery: label_discovery:
alertmanager_data: alertmanager_data:
networks: networks: