-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-mon.yml
105 lines (98 loc) · 2.97 KB
/
docker-compose-mon.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
version: "3.6"
services:
prometheus:
image: prom/prometheus:v2.41.0
container_name: cms_prometheus
restart: always
networks:
- cogstack-model-serve_cms
volumes:
- ./docker/monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./docker/monitoring/prometheus/alert.rules:/etc/prometheus/alert.rules
- prometheus-data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--storage.tsdb.retention.time=1y"
- "--web.console.libraries=/etc/prometheus/console_libraries"
- "--web.console.templates=/etc/prometheus/consoles"
- "--web.enable-lifecycle"
expose:
- 9090
healthcheck:
test: [ "CMD", "wget", "-O", "/dev/null", "-o", "/dev/null", "http://localhost:9090" ]
interval: 60s
timeout: 20s
retries: 3
grafana:
image: grafana/grafana:9.3.2-ubuntu
container_name: cms_grafana
restart: always
networks:
- cogstack-model-serve_cms
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- ./docker/monitoring/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./docker/monitoring/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- grafana-data:/var/lib/grafana
expose:
- 3000
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:3000/healthz" ]
interval: 60s
timeout: 20s
retries: 3
alertmanager:
image: prom/alertmanager:v0.25.0
container_name: cms_alertmanager
restart: always
networks:
- cogstack-model-serve_cms
volumes:
- ./docker/monitoring/prometheus/alertmanager.yml:/etc/alertmanager/config.yml
command:
- "--config.file=/etc/alertmanager/config.yml"
- "--storage.path=/alertmanager"
expose:
- 9093
healthcheck:
test: [ "CMD", "wget", "-O", "/dev/null", "-o", "/dev/null", "http://localhost:9093/-/ready" ]
interval: 60s
timeout: 20s
retries: 3
depends_on:
prometheus:
condition: "service_healthy"
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.46.0
container_name: cms_cadvisor
restart: always
networks:
- cogstack-model-serve_cms
expose:
- 8080
volumes:
- /:/rootfs:ro
- /var/run/docker.sock:/var/run/docker.sock:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
command:
- "--enable_metrics=cpu,percpu,memory,network"
- "--store_container_labels=true"
- "--docker_only=true"
healthcheck:
test: [ "CMD", "wget", "-O", "/dev/null", "-o", "/dev/null", "http://localhost:8080/healthz" ]
interval: 60s
timeout: 20s
retries: 3
volumes:
prometheus-data:
driver: local
grafana-data:
driver: local
networks:
cogstack-model-serve_cms:
external: true