-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-monitoring.yml
113 lines (103 loc) · 3.18 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
105
106
107
108
109
110
111
112
113
version: "3"
x-logging:
&default-logging
options:
max-file: '1'
compress: 'false'
driver: local
networks:
indexer_services:
name: indexer_services
external: true
subquery_indexer:
name: subquery_indexer
external: true
volumes:
prometheus_data: {}
grafana_data: {}
services:
prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION}
container_name: indexer_prometheus
volumes:
- prometheus_data:/prometheus
- ./.data/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./.data/prometheus/prometheus.conf.d:/etc/prometheus/prometheus.conf.d
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
networks:
subquery_indexer:
ipv4_address: ${DOCKER_SUBNET_PREFIX}.8
expose:
- 9090
node-exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
expose:
- 9100
networks:
subquery_indexer:
ipv4_address: ${DOCKER_SUBNET_PREFIX}.9
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
- /:/host:ro,rslave
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points'
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
restart: always
grafana:
image: grafana/grafana:${GRAFANA_VERSION}
container_name: indexer_grafana
networks:
subquery_indexer:
ipv4_address: ${DOCKER_SUBNET_PREFIX}.10
# ports:
# - ${GRAFANA_EXPOSE_ADDR:-127.0.0.1:3000}:3000
expose:
- 3000
volumes:
- grafana_data:/var/lib/grafana
- ./.data/grafana/datasources:/etc/grafana/provisioning/datasources
- ./.data/grafana/dashboards:/etc/grafana/provisioning/dashboards
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
- GF_INSTALL_PLUGINS=fifemon-graphql-datasource
labels:
- "traefik.enable=${ENABLE_GRAFANA_EXTERNAL:-false}"
- "traefik.http.services.indexer-grafana.loadbalancer.server.port=3000"
- "traefik.http.routers.indexer-grafana.entrypoints=websecure"
- "traefik.http.routers.indexer-grafana.tls.certresolver=myresolver"
- "traefik.http.routers.indexer-grafana.rule=Host(`$DOMAIN_GRAFANA`)"
prometheus_graphql_exporter:
image: ricardbejarano/graphql_exporter:latest
container_name: prometheus_graphql_exporter
networks:
subquery_indexer:
ipv4_address: ${DOCKER_SUBNET_PREFIX}.13
expose:
- 9199
prometheus_bash_exporter:
image: prometheus_bash_exporter:latest
container_name: prometheus_bash_exporter
restart: always
command:
- '/app/server'
- '-debug=true'
- '-labels=env,displayName,deploymentId'
volumes:
- ./src/docker/sh_exporter/scripts:/scripts
# - ./.env:/scripts/.env
networks:
subquery_indexer:
ipv4_address: ${DOCKER_SUBNET_PREFIX}.12
build:
context: ./src/docker/sh_exporter/
dockerfile: Dockerfile
expose:
- 9300