monitoring/docker-compose.yml
2022-04-22 20:33:06 +02:00

120 lines
3.0 KiB
YAML

version: '3.8'
networks:
monitoring:
driver: bridge
services:
grafana:
# ARM bug in rate interval : https://github.com/grafana/grafana/issues/43002
image: grafana/grafana:8.2.7
container_name: grafana
restart: unless-stopped
volumes:
- ./data/grafana:/var/lib/grafana
- ./conf/grafana/provisioning:/etc/grafana/provisioning
ports:
- 3000:3000
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_USERS_ALLOW_SIGN_UP=false
networks:
- monitoring
prometheus:
image: prom/prometheus
container_name: prometheus
restart: unless-stopped
volumes:
- ./conf/prometheus:/etc/prometheus
- ./data/prometheus:/prometheus
ports:
- 9090:9090
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
- "--web.external-url=http://${EXTERNAL_IP}:9090"
expose:
- 9090
networks:
- monitoring
alertmanager:
image: prom/alertmanager
container_name: alertmanager
restart: unless-stopped
volumes:
- ./conf/alertmanager:/etc/alertmanager
- ./data/alertmanager:/alertmanager
ports:
- 9093:9093
command:
- '--config.file=/etc/alertmanager/alertmanager.yml'
- '--storage.path=/alertmanager'
- "--web.external-url=http://${EXTERNAL_IP}:9093"
expose:
- 9093
networks:
- monitoring
node-exporter:
image: prom/node-exporter
container_name: node-exporter
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.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
expose:
- 9100
networks:
- monitoring
blackbox_exporter:
image: prom/blackbox-exporter
container_name: blackbox
restart: unless-stopped
expose:
- 9115
networks:
- monitoring
# smokeping:
# image: quay.io/superq/smokeping-prober
# container_name: smokeping
# restart: unless-stopped
# command: nyyu.dev
# privileged: true
# expose:
# - 9374
# networks:
# - monitoring
cadvisor:
# ARM image
image: justrobin/cadvisor:v0.44.0
container_name: cadvisor
restart: unless-stopped
command:
- '--housekeeping_interval=10s'
- '--raw_cgroup_prefix_whitelist=/docker/'
- '--disable_metrics=cpu_topology,hugetlb'
privileged: true
pid: 'host'
ports:
- '8040:8080'
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:/dev/kmsg'
expose:
- 8080
networks:
- monitoring