Files
mtusi2026lab7/infra/loki/loki.yaml
T

70 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Loki 3.5 — хранилище логов (single binary, файловая система на volume lokidata).
# Логи приходят по native OTLP (/otlp/v1/logs) из Collector. Ресурсные атрибуты service.name,
# service.instance.id, deployment.environment.name → index labels (низкая кардинальность);
# атрибуты записи (event, request_id, job_id, trace_id, span_id …) → structured metadata
# (не индексируются как labels, но фильтруются: {service_name="messenger-api"} | request_id="…").
auth_enabled: false
# lab7: Loki слушает только loopback namespace шлюза loki-gw; снаружи — mTLS :3100 с ACL по identity.
server:
http_listen_address: 127.0.0.1
http_listen_port: 3101
grpc_listen_address: 127.0.0.1
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: 2024-01-01
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
limits_config:
allow_structured_metadata: true
volume_enabled: true
retention_period: 168h # 7 дней учебной истории
ingestion_rate_mb: 8
ingestion_burst_size_mb: 16
max_label_names_per_series: 15
otlp_config:
resource_attributes:
attributes_config:
- action: index_label
attributes: [deployment.environment.name]
compactor:
working_directory: /loki/compactor
retention_enabled: true
delete_request_store: filesystem
compaction_interval: 10m
ingester:
chunk_idle_period: 5m
max_chunk_age: 1h
query_range:
results_cache:
cache:
embedded_cache:
enabled: true
max_size_mb: 50
analytics:
reporting_enabled: false # без отправки статистики во внешний интернет