-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
132 lines (122 loc) · 3.47 KB
/
docker-compose.yaml
File metadata and controls
132 lines (122 loc) · 3.47 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
130
131
132
# version: '3.8'
networks:
monitoring:
driver: bridge
name: monitoring
volumes:
prometheus_data:
name: prometheus_data
grafana-data:
name: grafana-data
loki-data:
name: loki-data
tempo-data:
name: tempo-data
otel-data:
name: otel-data
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./alert-rules.yml:/etc/prometheus/alert-rules.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=90d' # retention time
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- "9090:9090"
networks:
- monitoring
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
networks:
- monitoring
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
- '--collector.processes'
ports:
- "9100:9100"
networks:
- monitoring
alertmanager:
image: prom/alertmanager:latest
container_name: alertmanager
restart: unless-stopped
ports:
- "9093:9093"
command:
- --config.file=/etc/alertmanager/alert-config.yaml
volumes:
- ./alert-config.yaml:/etc/alertmanager/alert-config.yaml
- ./alert-email-template.tmpl:/etc/alertmanager/email-template.tmpl:ro
networks:
- monitoring
tempo:
image: grafana/tempo:latest
container_name: tempo
restart: unless-stopped
ports:
- "3200:3200" # Tempo HTTP API
- "4317" # otlp grpc
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- tempo-data:/tmp/tempo # compatible with storage path
command: ["-config.file=/etc/tempo.yaml"]
networks:
- monitoring
loki:
image: grafana/loki:latest
container_name: loki
restart: unless-stopped
ports:
- "3100:3100" # Loki HTTP port
volumes:
- ./loki-config.yaml:/etc/loki/loki-config.yaml
- loki-data:/data/loki
command: -config.file=/etc/loki/loki-config.yaml
networks:
- monitoring
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel-collector
restart: unless-stopped
volumes:
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
command:
- "--config=/etc/otelcol-contrib/config.yaml"
environment:
- OTELCOL_LOG_LEVEL=debug # <- We set the log level here
ports:
- 1888:1888 # pprof extension
- 8890:8890 # Prometheus metrics exposed by the Collector
- 8889:8889 # Prometheus exporter metrics
- 13133:13133 # health_check extension
- 4317:4317 # OTLP gRPC receiver
- 4318:4318 # OTLP http receiver
- 55679:55679 # zpages extension
networks:
- monitoring