-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.node.yml
49 lines (47 loc) · 1.4 KB
/
docker-compose.node.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
version: '3.7'
# this is the docker-compose for monitoring services on each node
services:
filebeat:
# filebeat pushes logs to elasticsearch monitoring
restart: always
image: elastic/filebeat:7.17.9
user: "root"
privileged: true
command: [ "--strict.perms=false" ]
environment:
- ELASTICSEARCH_HOSTS
- KIBANA_URI
volumes:
- ./configs/filebeat/config.yml:/usr/share/filebeat/filebeat.yml:ro
- ./configs/filebeat/ilm-config.json:/usr/share/filebeat/ilm-config.json:ro
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock
# this monitors the linux host itself
node_exporter:
restart: always
image: prom/node-exporter:v1.2.2
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.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
ports:
- 8281:9100
# this monitors docker on the host
cadvisor:
restart: always
image: gcr.io/cadvisor/cadvisor:v0.40.0
privileged: true
devices:
- /dev/kmsg:/dev/kmsg
volumes:
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
- /var/run:/var/run:ro
- /var/run/docker.sock:/var/run/docker.sock:rw
ports:
- 8280:8080