-
Notifications
You must be signed in to change notification settings - Fork 1k
/
docker-compose.metrics.yml
108 lines (101 loc) · 2.92 KB
/
docker-compose.metrics.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
105
106
107
108
version: '2'
services:
prometheus:
container_name: prometheus
image: prom/prometheus
ports:
- 9090:9090
command: '--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.retention.time=10y'
volumes:
- ./docker/prometheus/prometheus.docker.yml:/etc/prometheus/prometheus.yml
- ./docker/prometheus/prometheus_rules.yml:/etc/prometheus/prometheus_rules.yml
- ./docker/volumes/prometheus_data:/prometheus
depends_on:
- node-exporter
- haproxy
- flask_metrics_mongo
- flask_metrics_redis
- flask_metrics_haproxy
external_links:
- haproxy
- flask_metrics_mongo
- flask_metrics_redis
- flask_metrics_haproxy
node-exporter:
container_name: node-exporter
image: prom/node-exporter
ports:
- 9100:9100
grafana:
container_name: grafana
image: grafana/grafana:8.2.6
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=pass
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- ./docker/volumes/grafana_data:/var/lib/grafana
- ./docker/grafana/datasources/datasource.docker.yaml:/etc/grafana/provisioning/datasources/datasource.docker.yaml
- ./docker/grafana/dashboards/:/etc/grafana/provisioning/dashboards/
external_links:
- prometheus
flask_metrics_mongo:
container_name: flask_metrics_mongo
image: newsblur/newsblur_monitor:latest
command: bash -c "python /srv/newsblur/flask_metrics/flask_metrics_mongo.py"
environment:
- DOCKERBUILD=True
ports:
- 5569:5569
depends_on:
- db_mongo
- newsblur_web
- nginx
volumes:
- ${PWD}:/srv/newsblur
flask_metrics_redis:
container_name: flask_metrics_redis
image: newsblur/newsblur_monitor:latest
command: bash -c "python /srv/newsblur/flask_metrics/flask_metrics_redis.py"
environment:
- DOCKERBUILD=True
ports:
- 5589:5569
depends_on:
- db_redis
- newsblur_web
- nginx
volumes:
- ${PWD}:/srv/newsblur
flask_metrics_haproxy:
container_name: flask_metrics_haproxy
image: newsblur/newsblur_monitor:latest
command: bash -c "python /srv/newsblur/flask_metrics/flask_metrics_haproxy.py"
environment:
- DOCKERBUILD=True
ports:
- 5599:5569
depends_on:
- haproxy
volumes:
- ${PWD}:/srv/newsblur
elasticsearch_exporter:
container_name: elasticsearch_exporter
image: prometheuscommunity/elasticsearch-exporter:latest
command:
- '--es.uri=http://db_elasticsearch:9200'
restart: always
ports:
- "9210:9114"
depends_on:
- db_elasticsearch
postgres_exporter:
container_name: postgres-exporter
image: prometheuscommunity/postgres-exporter
environment:
DATA_SOURCE_NAME: 'postgresql://newsblur:newsblur@db_postgres:5432/postgres?sslmode=disable'
ports:
- '9187:9187'