-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose-monitoring.yml
195 lines (182 loc) · 5.29 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
version: "3.7"
networks:
monitoring-net:
name: monitoring-net
mojaloop-net:
name: mojaloop-net
external: true
volumes:
vol_prometheus_data: {}
vol_grafana_data: {}
services:
prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION}
volumes:
- ./docker/prometheus/:/etc/prometheus/
- vol_prometheus_data:/prometheus/
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--enable-feature=native-histograms' # Ref: https://prometheus.io/docs/concepts/metric_types/#histogram, https://k6.io/docs/results-output/real-time/prometheus-remote-write/#send-test-metrics-to-a-remote-write-endpoint
- '--web.enable-remote-write-receiver' # Ref: https://prometheus.io/docs/prometheus/latest/feature_flags/#remote-write-receiver
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9090:9090
links:
- cadvisor:cadvisor
#- alertmanager:alertmanager
#- pushgateway:pushgateway
depends_on:
- cadvisor
#- pushgateway
networks:
- mojaloop-net
- monitoring-net
restart: always
# deploy:
# placement:
# constraints:
# - node.hostname == ${HOSTNAME}
node-exporter:
image: quay.io/prometheus/node-exporter:${NODE_EXPORTER_VERSION}
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
- /:/host:ro,rslave
command:
- '--path.rootfs=/host'
- '--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)($$|/)"
ports:
- 9100:9100
networks:
- mojaloop-net
- monitoring-net
restart: always
deploy:
mode: global
# alertmanager:
# image: prom/alertmanager
# ports:
# - 9093:9093
# volumes:
# - ./docker/alertmanager/:/etc/alertmanager/
# networks:
# - mojaloop-net
# - monitoring-net
# restart: always
# command:
# - '--config.file=/etc/alertmanager/config.yml'
# - '--storage.path=/alertmanager'
# # deploy:
# # placement:
# # constraints:
# # - node.hostname == ${HOSTNAME}
cadvisor:
image: gcr.io/cadvisor/cadvisor:${CADVISER_VERSION}
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- 8080:8080
networks:
- mojaloop-net
- monitoring-net
restart: always
deploy:
mode: global
grafana:
image: grafana/grafana:${GRAFANA_VERSION}
user: "472"
depends_on:
- prometheus
ports:
- 9999:3000
volumes:
- vol_grafana_data:/var/lib/grafana
- ./docker/grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- ./docker/grafana/config.env
environment:
GF_SECURITY_DATA_SOURCE_PROXY_WHITELIST: mysql-cl:3306
GRAFANA_CL_MYSQL_PASSWORD: password
GF_RENDERING_SERVER_URL: http://renderer:8081/render
GF_RENDERING_CALLBACK_URL: http://grafana:3000/
GF_LOG_FILTERS: rendering:debug
networks:
- mojaloop-net
- monitoring-net
restart: always
## Ref: https://github.com/grafana/grafana-image-renderer
renderer:
image: grafana/grafana-image-renderer:${GRAFANA_RENDERER_VERSION}
ports:
- 8081:8081
environment:
# ENABLE_METRICS: 'true'
# VIRTUAL_HOST: renderer.loc
HTTP_HOST: 0.0.0.0
# RENDERING_MODE: ${RENDERING_MODE}
# RENDERING_CLUSTERING_MODE: ${RENDERING_CLUSTERING_MODE}
# RENDERING_CLUSTERING_MAX_CONCURRENCY: ${RENDERING_CLUSTERING_MAX_CONCURRENCY}
# RENDERING_ARGS: --no-sandbox,--disable-setuid-sandbox,--disable-dev-shm-usage,--disable-accelerated-2d-canvas,--disable-gpu,--window-size=8000x8000
networks:
- monitoring-net
volumes:
- ./docker/renderer/config.json:/usr/src/app/config.json
mysqlexporter-als:
image: prom/mysqld-exporter:${MYSQLD_EXPORTER_VERSION}
# ports:
# - "9104:9104"
networks:
- mojaloop-net
- monitoring-net
environment:
- MYSQLD_EXPORTER_PASSWORD=password
command:
- --mysqld.address=mysql-als:3306
- --mysqld.username=exporter
profiles:
- als-test
mysqlexporter-cl:
image: prom/mysqld-exporter:${MYSQLD_EXPORTER_VERSION}
# ports:
# - "9104:9104"
networks:
- mojaloop-net
- monitoring-net
environment:
- MYSQLD_EXPORTER_PASSWORD=password
command:
- --mysqld.address=mysql-cl:3306
- --mysqld.username=exporter
profiles:
- transfers-test
- quotes-test
kafka-exporter:
image: danielqsj/kafka-exporter:${KAFKA_EXPORTER_VERSION}
ports:
- "9308:9308"
networks:
- mojaloop-net
- monitoring-net
command:
- --kafka.server=kafka:29092
kafka-mon-ui:
image: docker.redpanda.com/redpandadata/console:${DEP_KAfKA_UI_VERSION}
deploy:
replicas: 1
restart: on-failure
hostname: kafka-mon-ui
ports:
- "9080:8080"
networks:
- mojaloop-net
environment:
- KAFKA_BROKERS=kafka:29092