-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose-monitoring.yml
104 lines (98 loc) · 2.95 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
version: "2.2"
services:
############################################### Prometheus ###############################################
prometheus:
container_name: 'prometheus'
restart: unless-stopped
build:
context: .
dockerfile: docker/monitoring/Dockerfile-prometheus
args:
PROMETHEUS_VERSION: ${PROMETHEUS_VERSION}
volumes:
- prometheus-etc:/etc/prometheus/
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
labels:
- "traefik.enable=true"
- "traefik.backend=prometheus"
- "traefik.frontend.rule=Host: prometheus.hackinglab.network"
networks:
- default
- prom-gf-backend
cpus: 2
mem_limit: 300M
############################################### Grafana ###############################################
grafana:
image: grafana/grafana:6.7.3
container_name: 'grafana'
restart: unless-stopped
user: "472"
labels:
- "traefik.enable=true"
- "traefik.backend=grafana"
- "traefik.port=3000"
- "traefik.frontend.rule=Host: grafana.hackinglab.network"
volumes:
- grafana-data:/var/lib/grafana
- grafana-provisioning:/etc/grafana/provisioning/
networks:
- default
- prom-gf-backend
ports:
- 3000:3000
depends_on:
- prometheus
- influxdb
cpus: 2
mem_limit: 300M
############################################### InfluxDB ###############################################
influxdb:
image: influxdb:1.8.0-alpine
container_name: 'influxdb'
restart: unless-stopped
environment:
- INFLUXDB_DB=db0
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
- INFLUXDB_USER=${INFLUXDB_USER}
- INFLUXDB_USER_PASSWORD=${INFLUXDB_USER_PASSWORD}
ports:
- 8086:8086
networks:
- default
- prom-gf-backend
volumes:
- influxdb-data:/var/lib/influxdb
############################################### cAdvisor ###############################################
cadvisor:
image: google/cadvisor:latest
restart: unless-stopped
#container_name: 'cadvisor'
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
networks:
- prom-gf-backend
############################################### Node-exporter ###############################################
node-exporter:
image: prom/node-exporter:latest
restart: unless-stopped
#container_name: 'node-exporter'
networks:
- prom-gf-backend
networks:
prom-gf-backend:
volumes:
prometheus-data:
prometheus-etc:
grafana-data:
grafana-provisioning:
influxdb-data: