-
Notifications
You must be signed in to change notification settings - Fork 115
/
monitor.yml
63 lines (57 loc) · 1.52 KB
/
monitor.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
version: "3.1"
services:
monitor:
image: vfarcic/docker-flow-monitor
environment:
- LISTENER_ADDRESS=swarm-listener
- GLOBAL_SCRAPE_INTERVAL=${SCRAPE_INTERVAL:-10s}
- ARG_WEB_ROUTE-PREFIX=/monitor
- ARG_WEB_EXTERNAL-URL=http://${DOMAIN:-localhost}/monitor
- ARG_ALERTMANAGER_URL=http://alert-manager:9093
networks:
- proxy
- monitor
deploy:
labels:
- com.df.notify=true
- com.df.distribute=true
- com.df.servicePath=/monitor
- com.df.serviceDomain=${DOMAIN:-localhost}
- com.df.port=9090
resources:
reservations:
memory: 500M
limits:
memory: 800M
alert-manager:
image: prom/alertmanager
networks:
- monitor
secrets:
- alert_manager_config
command: --config.file=/run/secrets/alert_manager_config --storage.path=/alertmanager
swarm-listener:
image: vfarcic/docker-flow-swarm-listener
networks:
- monitor
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DF_NOTIFY_CREATE_SERVICE_URL=http://monitor:8080/v1/docker-flow-monitor/reconfigure
- DF_NOTIFY_REMOVE_SERVICE_URL=http://monitor:8080/v1/docker-flow-monitor/remove
deploy:
placement:
constraints: [node.role == manager]
resources:
reservations:
memory: 5M
limits:
memory: 10M
networks:
monitor:
external: true
proxy:
external: true
secrets:
alert_manager_config:
external: true