2020-04-09 23:45:33 +00:00
|
|
|
version: '2.1'
|
|
|
|
|
|
|
|
networks:
|
|
|
|
monitor-net:
|
|
|
|
driver: bridge
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
prometheus_data: {}
|
|
|
|
grafana_data: {}
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
prometheus:
|
2023-10-13 10:31:46 +00:00
|
|
|
image: prom/prometheus:v2.24.1
|
2020-04-09 23:45:33 +00:00
|
|
|
container_name: prometheus
|
|
|
|
volumes:
|
|
|
|
- ./prometheus:/etc/prometheus
|
|
|
|
- prometheus_data:/prometheus
|
|
|
|
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
|
|
|
|
expose:
|
|
|
|
- 9090
|
|
|
|
networks:
|
|
|
|
- monitor-net
|
|
|
|
labels:
|
|
|
|
org.label-schema.group: "monitoring"
|
|
|
|
|
|
|
|
alertmanager:
|
2023-10-13 10:31:46 +00:00
|
|
|
image: prom/alertmanager:v0.21.0
|
2020-04-09 23:45:33 +00:00
|
|
|
container_name: alertmanager
|
|
|
|
volumes:
|
|
|
|
- ./alertmanager:/etc/alertmanager
|
|
|
|
command:
|
|
|
|
- '--config.file=/etc/alertmanager/config.yml'
|
|
|
|
- '--storage.path=/alertmanager'
|
|
|
|
restart: unless-stopped
|
|
|
|
expose:
|
|
|
|
- 9093
|
|
|
|
networks:
|
|
|
|
- monitor-net
|
|
|
|
labels:
|
|
|
|
org.label-schema.group: "monitoring"
|
|
|
|
|
|
|
|
nodeexporter:
|
2023-10-13 10:31:46 +00:00
|
|
|
image: prom/node-exporter:v1.0.1
|
2020-04-09 23:45:33 +00:00
|
|
|
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.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
|
|
|
|
restart: unless-stopped
|
|
|
|
expose:
|
|
|
|
- 9100
|
|
|
|
networks:
|
|
|
|
- monitor-net
|
|
|
|
labels:
|
|
|
|
org.label-schema.group: "monitoring"
|
|
|
|
|
|
|
|
cadvisor:
|
2023-10-13 10:31:46 +00:00
|
|
|
image: gcr.io/cadvisor/cadvisor:latest
|
2020-04-09 23:45:33 +00:00
|
|
|
container_name: cadvisor
|
|
|
|
volumes:
|
|
|
|
- /:/rootfs:ro
|
|
|
|
- /var/run:/var/run:rw
|
|
|
|
- /sys:/sys:ro
|
|
|
|
- /var/lib/docker:/var/lib/docker:ro
|
2023-10-13 10:31:46 +00:00
|
|
|
- /sys/fs/cgroup:/cgroup:ro
|
|
|
|
- /dev/disk/:/dev/disk:ro
|
2020-04-09 23:45:33 +00:00
|
|
|
restart: unless-stopped
|
2023-10-13 10:31:46 +00:00
|
|
|
devices:
|
|
|
|
- /dev/kmsg:/dev/kmsg
|
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
2020-04-09 23:45:33 +00:00
|
|
|
expose:
|
|
|
|
- 8080
|
|
|
|
networks:
|
|
|
|
- monitor-net
|
|
|
|
labels:
|
|
|
|
org.label-schema.group: "monitoring"
|
2023-10-13 10:31:46 +00:00
|
|
|
command:
|
|
|
|
- '-housekeeping_interval=10s'
|
|
|
|
- '-docker_only=true'
|
2020-04-09 23:45:33 +00:00
|
|
|
|
|
|
|
grafana:
|
2023-10-13 10:31:46 +00:00
|
|
|
image: grafana/grafana:7.3.7
|
2020-04-09 23:45:33 +00:00
|
|
|
container_name: grafana
|
|
|
|
volumes:
|
|
|
|
- grafana_data:/var/lib/grafana
|
|
|
|
- ./grafana/provisioning:/etc/grafana/provisioning
|
|
|
|
environment:
|
|
|
|
- GF_SECURITY_ADMIN_USER=${ADMIN_USER}
|
|
|
|
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
|
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
|
|
restart: unless-stopped
|
|
|
|
expose:
|
|
|
|
- 3000
|
|
|
|
networks:
|
|
|
|
- monitor-net
|
|
|
|
labels:
|
|
|
|
org.label-schema.group: "monitoring"
|
|
|
|
|
|
|
|
pushgateway:
|
|
|
|
image: prom/pushgateway:v1.2.0
|
|
|
|
container_name: pushgateway
|
|
|
|
restart: unless-stopped
|
|
|
|
expose:
|
|
|
|
- 9091
|
|
|
|
networks:
|
|
|
|
- monitor-net
|
|
|
|
labels:
|
|
|
|
org.label-schema.group: "monitoring"
|
|
|
|
|
|
|
|
caddy:
|
|
|
|
image: stefanprodan/caddy
|
|
|
|
container_name: caddy
|
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
- "9090:9090"
|
|
|
|
- "9093:9093"
|
|
|
|
- "9091:9091"
|
|
|
|
volumes:
|
|
|
|
- ./caddy:/etc/caddy
|
|
|
|
environment:
|
|
|
|
- ADMIN_USER=${ADMIN_USER}
|
|
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
- monitor-net
|
|
|
|
labels:
|
|
|
|
org.label-schema.group: "monitoring"
|