Files
mtusi2026lab7/infra/loki.yaml
T
2026-11-27 23:05:20 +03:00

61 lines
1.7 KiB
YAML

auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
log_level: warn
# TLS только на HTTP API (collector → :3100, Grafana, probe).
# gRPC-порт 9096 — внутренний loopback между компонентами одного процесса
# Loki; dskit не умеет поднимать TLS там для внутренних клиентов, и
# grpc_tls_config ломает ingester/scheduler ("error reading server preface").
http_tls_config:
cert_file: /run/secrets/loki_crt
key_file: /run/secrets/loki_key
common:
path_prefix: /loki
storage:
filesystem:
chunks_directory: /loki/chunks
rules_directory: /loki/rules
replication_factor: 1
ring:
instance_addr: 127.0.0.1
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
retention_period: 24h
reject_old_samples: false
# Явная карта OTLP resource attributes → labels/structured metadata.
# service.name становится индексной меткой service_name (используется в
# Grafana и в student-tests).
otlp_config:
resource_attributes:
attributes_config:
- action: index_label
attributes:
- service.name
- action: structured_metadata
attributes:
- service.namespace
- service.version
- service.instance.id
- deployment.environment.name
compactor:
working_directory: /loki/compactor
retention_enabled: true
delete_request_store: filesystem