# ============================================================================
#  CentralLogging — Loki konfigurace
#  Verze:  1.0
#  Datum:  2026-06-08
#  Popis:  Single-binary Loki, filesystem storage, retence 90 dní.
#          Retenci vynucuje compactor (delete_request + retention_period).
# ============================================================================
auth_enabled: false

server:
  http_listen_port: 3100
  grpc_listen_port: 9096
  log_level: info

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

storage_config:
  tsdb_shipper:
    active_index_directory: /loki/tsdb-index
    cache_location: /loki/tsdb-cache
  filesystem:
    directory: /loki/chunks

limits_config:
  retention_period: 2160h          # 90 dní
  reject_old_samples: true
  reject_old_samples_max_age: 168h # 7 dní (logy starší se odmítnou)
  max_label_names_per_series: 15
  ingestion_rate_mb: 16
  ingestion_burst_size_mb: 32
  allow_structured_metadata: true

compactor:
  working_directory: /loki/compactor
  compaction_interval: 10m
  retention_enabled: true          # zapne mazání dle retention_period
  retention_delete_delay: 2h
  delete_request_store: filesystem

# Analytika do Grafana Labs vypnuta
analytics:
  reporting_enabled: false
