-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.agents.yml
88 lines (82 loc) · 2.08 KB
/
docker-compose.agents.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
version: "3.1"
networks:
monitor-net:
driver: bridge
services:
# Node exporter capture host metrics
nodeexporter:
image: prom/node-exporter:v1.5.0
container_name: nodeexporter
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)($$|/)'
restart: unless-stopped
expose:
- 9100
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"
# Cadvisor monitor container metrics
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.46.0
container_name: cadvisor
privileged: true
devices:
- /dev/kmsg:/dev/kmsg
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
#- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux
restart: unless-stopped
expose:
- 8080
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"
# Promtail retrieve log from hosts and containers
promtail:
image: grafana/promtail:2.6.0
container_name: promtail
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/log:/var/log:ro
- ./loki/promtail-config.yaml:/etc/promtail/promtail-config.yaml
command: -config.file=/etc/promtail/promtail-config.yaml
restart: always
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"
# Fake Logs
log_agent:
image: log_agent/log_agent:latest
build:
context: ./log-agent
dockerfile: Dockerfile
container_name: log_agent
restart: always
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"
# Pushgateway
pushgateway:
image: prom/pushgateway:v1.5.1
container_name: pushgateway
restart: unless-stopped
expose:
- 9091
networks:
- monitor-net
labels:
org.label-schema.group: "monitoring"