-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.monitoring.yml
129 lines (120 loc) · 3.49 KB
/
docker-compose.monitoring.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: "3.7"
# See: https://github.com/vegasbrianc/prometheus/blob/master/docker-compose.yml
services:
prometheus:
image: prom/prometheus:v2.3.2
container_name: "${PROJECT_NAME}_prometheus"
restart: always
depends_on:
- cadvisor
volumes:
- prometheus_data:/prometheus
- ./monitoring/prometheus/:/etc/prometheus/
networks:
- frontend_result_queue
- monitoring
- chrome_worker_monitoring
- firefox_worker_monitoring
- phantomjs_worker_monitoring
- frontend_monitoring
labels:
- "traefik.enable=true"
- "traefik.port=9090"
- "traefik.backend=prometheus"
- "traefik.frontend.rule=Host:prometheus.${PROJECT_BASE_URL}"
- "traefik.docker.network=${PROJECT_NAME}_monitoring"
grafana:
image: grafana/grafana:5.2.4
container_name: "${PROJECT_NAME}_grafana"
restart: always
depends_on:
- prometheus
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- ./monitoring/grafana/config.monitoring
networks:
- monitoring
labels:
- "traefik.enable=true"
- "traefik.port=3000"
- "traefik.backend=grafana"
- "traefik.frontend.rule=Host:grafana.${PROJECT_BASE_URL}"
- "traefik.docker.network=${PROJECT_NAME}_monitoring"
cadvisor:
image: google/cadvisor:v0.31.0
container_name: "${PROJECT_NAME}_cadvisor"
restart: always
ports:
- 9500:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
networks:
- monitoring
labels:
- "traefik.enable=true"
- "traefik.port=9500"
- "traefik.backend=cadvisor"
- "traefik.frontend.rule=Host:cadvisor.${PROJECT_BASE_URL}"
- "traefik.docker.network=${PROJECT_NAME}_monitoring"
node_exporter:
image: prom/node-exporter:v0.16.0
container_name: "${PROJECT_NAME}_node_exporter"
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
- "--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)($$|/)"
networks:
- monitoring
labels:
- "traefik.enable=true"
- "traefik.port=9100"
- "traefik.backend=node-exporter"
- "traefik.frontend.rule=Host:node-exporter.${PROJECT_BASE_URL}"
- "traefik.docker.network=${PROJECT_NAME}_monitoring"
restart: always
alertmanager:
image: prom/alertmanager:v0.15.2
volumes:
- ./monitoring/alertmanager/:/etc/alertmanager/
networks:
- monitoring
- smtp
restart: always
command:
- "--config.file=/etc/alertmanager/config.yml"
- "--storage.path=/alertmanager"
labels:
- "traefik.port=9093"
- "traefik.enable=true"
- "traefik.backend=alertmanager"
- "traefik.frontend.rule=Host:alertmanager.${PROJECT_BASE_URL}"
- "traefik.docker.network=${PROJECT_NAME}_monitoring"
mail_server:
image: boky/postfix
restart: always
container_name: "${PROJECT_NAME}_mail_server"
environment:
- "HOSTNAME=${MAIL_SERVER_HOSTNAME}"
- "ALLOWED_SENDER_DOMAINS=${MAIL_SERVER_ALLOWED_SENDER_DOMAINS}"
- "RELAYHOST=${MAIL_SERVER_RELAYHOST}"
networks:
- smtp
labels:
- "traefik.enable=false"
volumes:
prometheus_data: {}
grafana_data: {}
networks:
monitoring: {}
smtp: {}