-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose-observability.yml
More file actions
139 lines (132 loc) · 3.71 KB
/
docker-compose-observability.yml
File metadata and controls
139 lines (132 loc) · 3.71 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
133
134
135
136
137
138
139
# Full Observability Stack with Grafana Alloy
# Includes: Logs (Loki), Traces (Tempo), Profiles (Pyroscope), Frontend (Grafana)
networks:
observability:
name: validatorinfo_observability
driver: bridge
volumes:
loki_data:
tempo_data:
pyroscope_data:
grafana_data:
alloy_data:
services:
# ============================================
# Grafana Alloy - Unified Telemetry Collector
# ============================================
alloy:
image: grafana/alloy:latest
container_name: alloy
restart: unless-stopped
ports:
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
- "12345:12345" # Alloy UI
volumes:
- ./alloy-config.river:/etc/alloy/config.river
- alloy_data:/var/lib/alloy
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./logs:/app/logs:ro
command:
- run
- --server.http.listen-addr=0.0.0.0:12345
- --storage.path=/var/lib/alloy
- --stability.level=experimental
- /etc/alloy/config.river
networks:
- observability
depends_on:
- loki
- tempo
- pyroscope
# ============================================
# Loki - Log Aggregation
# ============================================
loki:
image: grafana/loki:3.0.0
container_name: loki
restart: unless-stopped
ports:
- "3100:3100"
volumes:
- ./loki-config.yml:/etc/loki/config.yml
- loki_data:/loki
command: -config.file=/etc/loki/config.yml
networks:
- observability
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3100/ready"]
interval: 10s
timeout: 5s
retries: 5
# ============================================
# Tempo - Distributed Tracing
# ============================================
tempo:
image: grafana/tempo:2.4.0
container_name: tempo
restart: unless-stopped
ports:
- "3200:3200" # Tempo HTTP
- "4316:4317" # OTLP gRPC (alternative port to avoid conflicts)
volumes:
- ./tempo-config.yml:/etc/tempo/config.yml
- tempo_data:/var/tempo
command: -config.file=/etc/tempo/config.yml
networks:
- observability
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3200/ready"]
interval: 10s
timeout: 5s
retries: 5
# ============================================
# Pyroscope - Continuous Profiling
# ============================================
pyroscope:
image: grafana/pyroscope:1.5.0
container_name: pyroscope
restart: unless-stopped
ports:
- "4040:4040"
volumes:
- pyroscope_data:/var/lib/pyroscope
command:
- server
environment:
- PYROSCOPE_LOG_LEVEL=info
networks:
- observability
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:4040/healthz"]
interval: 10s
timeout: 5s
retries: 5
# ============================================
# Grafana - Observability Frontend
# ============================================
grafana:
image: grafana/grafana:10.4.0
container_name: grafana
restart: unless-stopped
ports:
- "3002:3000"
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=false
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor,traceToMetrics,traceToLogs,correlations
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- grafana_data:/var/lib/grafana
networks:
- observability
depends_on:
- loki
- tempo
- pyroscope
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/api/health"]
interval: 10s
timeout: 5s
retries: 5