forked from mtusi2026/mtusi2026lab7
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
# Loki 3.7 (grafana/loki:3.7.10), single binary, lab 6: the LOGS store.
|
|
#
|
|
# Logs arrive from the Collector over OTLP (POST /otlp/v1/logs). Loki turns a few RESOURCE
|
|
# attributes into index labels (service_name, service_instance_id, deployment_environment_name):
|
|
# few values, small index. Log-record attributes (event, request_id, job_id, trace_id, span_id,
|
|
# route, status...) are stored as STRUCTURED METADATA next to the line - searchable
|
|
# (`{service_name="messenger-api"} | trace_id="..."`) without creating a stream per value.
|
|
# That is why an id such as request_id/attachment_id never becomes a label (it would create a
|
|
# new stream - and index entries - per request, see docs/DEFENSE.md).
|
|
auth_enabled: false
|
|
|
|
server:
|
|
http_listen_port: 3100
|
|
grpc_listen_port: 9096
|
|
log_level: warn
|
|
|
|
common:
|
|
instance_addr: 127.0.0.1
|
|
path_prefix: /loki
|
|
storage:
|
|
filesystem:
|
|
chunks_directory: /loki/chunks
|
|
rules_directory: /loki/rules
|
|
replication_factor: 1
|
|
ring:
|
|
kvstore:
|
|
store: inmemory
|
|
|
|
schema_config:
|
|
configs:
|
|
- from: 2026-01-01
|
|
store: tsdb
|
|
object_store: filesystem
|
|
schema: v13
|
|
index:
|
|
prefix: index_
|
|
period: 24h
|
|
|
|
limits_config:
|
|
allow_structured_metadata: true
|
|
retention_period: 168h # 7 days of logs, deleted by the compactor
|
|
ingestion_rate_mb: 8
|
|
ingestion_burst_size_mb: 16
|
|
max_query_lookback: 168h
|
|
volume_enabled: true
|
|
|
|
compactor:
|
|
working_directory: /loki/compactor
|
|
retention_enabled: true
|
|
delete_request_store: filesystem
|
|
|
|
ingester:
|
|
wal:
|
|
dir: /loki/wal # on the named volume: a restart does not lose buffered logs
|
|
|
|
pattern_ingester:
|
|
enabled: false
|
|
|
|
analytics:
|
|
reporting_enabled: false
|