forked from bvis/docker-prometheus-swarm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
129 lines (122 loc) · 3.15 KB
/
docker-compose.yml
File metadata and controls
129 lines (122 loc) · 3.15 KB
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
version: "3"
networks:
monitoring:
services:
cadvisor:
image: google/cadvisor:${CADVISOR_VERSION:-v0.26.1}
networks:
- monitoring
volumes:
- /var/run/docker.sock:/var/run/docker.sock,readonly
- /:/rootfs
- /var/run:/var/run
- /sys:/sys
- /var/lib/docker/:/var/lib/docker
deploy:
mode: global
resources:
limits:
cpus: '0.10'
memory: 128M
reservations:
cpus: '0.10'
memory: 64M
node-exporter:
image: basi/node-exporter:${NODE_EXPORTER_VERSION:-latest}
networks:
- monitoring
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
- /etc/hostname:/etc/host_hostname
hostname: "{{.Node.ID}}"
environment:
HOST_HOSTNAME: /etc/host_hostname
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.textfile.directory=/etc/node-exporter/'
- '--collector.filesystem.ignored-mount-points="^/(sys|proc|dev|host|etc)($$|/)"'
deploy:
mode: global
resources:
limits:
cpus: '0.10'
memory: 32M
reservations:
cpus: '0.10'
memory: 16M
docker-exporter:
image: basi/socat:${DOCKER_EXPORTER_VERSION:-v0.1.0}
networks:
- monitoring
deploy:
mode: global
resources:
limits:
cpus: '0.05'
memory: 6M
reservations:
cpus: '0.05'
memory: 4M
alertmanager:
image: basi/alertmanager:${ALERTMANAGER_VERSION:-v0.8.0}
networks:
- monitoring
# - logging
ports:
- "9093:9093"
environment:
SLACK_API: ${SLACK_API:-YOURTOKENGOESHERE}
LOGSTASH_URL: http://logstash:8080/
command: -config.file=/etc/alertmanager/config.yml
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: '0.01'
memory: 32M
reservations:
cpus: '0.01'
memory: 16M
prometheus:
image: basi/prometheus-swarm:${PROMETHEUS_SWARM_VERSION:-latest}
ports:
- "9090"
networks:
- monitoring
command: -config.file=/etc/prometheus/prometheus.yml -storage.local.path=/prometheus -web.console.libraries=/etc/prometheus/console_libraries -web.console.templates=/etc/prometheus/consoles -alertmanager.url=http://alertmanager:9093
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: '0.50'
memory: 1024M
reservations:
cpus: '0.50'
memory: 128M
grafana:
image: basi/grafana:${GRAFANA_VERSION:-4.4.3}
ports:
- "3000:3000"
networks:
- monitoring
environment:
GF_SECURITY_ADMIN_PASSWORD: ${GF_PASSWORD:-admin}
PROMETHEUS_ENDPOINT: http://prometheus:9090
ELASTICSEARCH_ENDPOINT: ${ES_ADDRESS:-http://elasticsearch:9200}
ELASTICSEARCH_USER: ${ES_USERNAME}
ELASTICSEARCH_PASSWORD: ${ES_PASSWORD}
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: '0.50'
memory: 64M
reservations:
cpus: '0.50'
memory: 32M