Add Loki, Promtail, and Grafana services for observability stack
This commit is contained in:
@@ -61,11 +61,58 @@ services:
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Optional local observability stack (can be enabled on servers that
|
||||
# should run Loki/Grafana). These services use configs found under
|
||||
# the repository `docker/` directory so the same config works in dev.
|
||||
loki:
|
||||
image: grafana/loki:2.8.2
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
ports:
|
||||
- "3100:3100"
|
||||
volumes:
|
||||
- ./loki-config/local-config.yaml:/etc/loki/local-config.yaml:ro
|
||||
- ../docker/loki-data:/loki
|
||||
# WAL directory: map a host folder so Loki (running as UID 10001)
|
||||
# can create the write-ahead log. Host folder created under
|
||||
# `docker/loki-wal` and owned by UID 10001.
|
||||
- ../docker/loki-wal:/wal
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://localhost:3100/ready || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:2.8.2
|
||||
volumes:
|
||||
# In prod you may want to point this at the host system log directory.
|
||||
- ../logs:/var/log/rad:ro
|
||||
- ./promtail-config.yml:/etc/promtail/promtail-config.yml:ro
|
||||
command: -config.file=/etc/promtail/promtail-config.yml
|
||||
depends_on:
|
||||
- loki
|
||||
restart: unless-stopped
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:10.2.0
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
volumes:
|
||||
- grafana-data:/var/lib/grafana
|
||||
depends_on:
|
||||
loki:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
static_volume:
|
||||
media_volume:
|
||||
grafana-data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
grpc_listen_port: 9095
|
||||
|
||||
ingester:
|
||||
lifecycler:
|
||||
address: 127.0.0.1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
chunk_idle_period: 5m
|
||||
chunk_retain_period: 30s
|
||||
max_transfer_retries: 0
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2020-10-24
|
||||
store: boltdb-shipper
|
||||
object_store: filesystem
|
||||
schema: v11
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
|
||||
storage_config:
|
||||
boltdb_shipper:
|
||||
active_index_directory: /loki/index
|
||||
cache_location: /loki/cache
|
||||
shared_store: filesystem
|
||||
filesystem:
|
||||
directory: /loki/chunks
|
||||
|
||||
# Compactor settings: ensure compactor working directory is inside the mounted
|
||||
# `/loki` path so the process (running as UID 10001) can create files.
|
||||
compactor:
|
||||
working_directory: /loki/compactor
|
||||
shared_store: filesystem
|
||||
|
||||
limits_config:
|
||||
enforce_metric_name: false
|
||||
|
||||
auth_enabled: false
|
||||
@@ -0,0 +1 @@
|
||||
{"UID":"f8cade59-3cf9-4ae3-965d-8b0a57007d58","created_at":"2025-12-01T17:14:05.101735276Z","version":{"version":"2.8.2","revision":"9f809eda7","branch":"HEAD","buildUser":"root@e401cfcb874f","buildDate":"2023-05-03T11:07:54Z","goVersion":"go1.20.4"}}
|
||||
Reference in New Issue
Block a user