# ============================================================
# Loki 配置文件
# ============================================================
# 说明：
#   - 使用本地文件系统存储日志数据
#   - 数据保留周期设置为 720h（30 天）
# ============================================================

auth_enabled: false

server:
  http_listen_port: 3100

common:
  path_prefix: /loki
  storage:
    filesystem:
      chunks_directory: /loki/chunks
      rules_directory: /loki/rules
  replication_factor: 1
  ring:
    kvstore:
      store: inmemory

schema_config:
  configs:
    - from: "2020-01-01"
      store: tsdb
      object_store: filesystem
      schema: v13
      index:
        prefix: index_
        period: 24h

# ============================================================
# 数据保留策略 - 720h (30 天)
# ============================================================
limits_config:
  retention_period: 720h

compactor:
  working_directory: /loki/compactor
  compaction_interval: 10m
  retention_enabled: true
  retention_delete_delay: 2h
  delete_request_store: filesystem
