
Prometheus
Exporters: node-exporter, cadvisor
Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.
🏠 Home: https://prometheus.io/
📦 Image: https://hub.docker.com/r/prom/prometheus
Introduction: https://prometheus.io/docs/introduction/overview/
Recommended collectors:
- https://hub.docker.com/r/prom/node-exporter/
- https://github.com/google/cadvisor/
- https://github.com/shizunge/endlessh-go/
name: prometheus
services:
prometheus:
image: prom/prometheus:v3.4.1
container_name: prometheus
restart: unless-stopped
user: "0:0"
volumes:
- ./prometheus:/etc/prometheus
- ${DOCKER_VOLUMES}/prometheus:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yaml"
networks:
- proxy
labels:
traefik.enable: true
traefik.http.routers.prometheus.middlewares: localaccess@file
traefik.http.services.prometheus.loadbalancer.server.port: 9090
homepage.group: Monitoring
homepage.name: Prometheus
homepage.icon: prometheus.png
homepage.href: https://prometheus.${MYDOMAIN}/
homepage.description: "Exporters: node-exporter, cadvisor"
node_exporter:
image: quay.io/prometheus/node-exporter:v1.9.1
container_name: node_exporter
restart: unless-stopped
pid: host
command:
- '--path.rootfs=/host'
volumes:
# kics-scan ignore-line
- '/:/host:ro,rslave'
networks:
- proxy
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.52.1
restart: unless-stopped
container_name: cadvisor
# kics-scan ignore-line
privileged: true
# kics-scan ignore-block
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
devices:
- /dev/kmsg
networks:
- proxy
networks:
proxy:
external: true