-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.monitoring.yml
More file actions
121 lines (114 loc) · 3.45 KB
/
docker-compose.monitoring.yml
File metadata and controls
121 lines (114 loc) · 3.45 KB
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
version: '3.8'
services:
prometheus:
image: prom/prometheus:latest
container_name: automaker-prometheus
ports:
- '9090:9090'
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--storage.tsdb.retention.time=30d'
- '--web.enable-lifecycle'
restart: unless-stopped
networks:
- monitoring
healthcheck:
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:9090/-/healthy']
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
loki:
image: grafana/loki:3.2.0
container_name: automaker-loki
restart: unless-stopped
ports:
- '3100:3100'
volumes:
- ./monitoring/loki/local-config.yml:/etc/loki/local-config.yml:ro
- loki-data:/loki
command: -config.file=/etc/loki/local-config.yml
networks:
- monitoring
promtail:
image: grafana/promtail:3.2.0
container_name: automaker-promtail
restart: unless-stopped
volumes:
- ./monitoring/promtail/config.yml:/etc/promtail/config.yml:ro
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
command: -config.file=/etc/promtail/config.yml
depends_on:
- loki
networks:
- monitoring
grafana:
image: grafana/grafana:latest
container_name: automaker-grafana
ports:
- '3010:3000'
volumes:
- ./monitoring/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=${GF_ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
# Discord webhook for alerting (create in Discord: Channel Settings > Integrations > Webhooks)
- DISCORD_WEBHOOK_INFRA=${DISCORD_WEBHOOK_INFRA:-}
restart: unless-stopped
networks:
- monitoring
depends_on:
prometheus:
condition: service_healthy
loki:
condition: service_started
healthcheck:
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:3000/api/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
node-exporter:
image: prom/node-exporter:latest
container_name: automaker-node-exporter
ports:
- '9100:9100'
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/host:ro,rslave
restart: unless-stopped
networks:
- monitoring
healthcheck:
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:9100/metrics']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
monitoring:
name: automaker-monitoring
driver: bridge
volumes:
prometheus-data:
name: automaker-prometheus-data
loki-data:
name: automaker-loki-data
grafana-data:
name: automaker-grafana-data