Files

56 lines
1.2 KiB
YAML

# Author: fruit.com.cn
# Loki 单机配置:文件系统存储,7 天保留,供 Grafana 查询容器日志。
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
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
query_range:
results_cache:
cache:
embedded_cache:
enabled: true
max_size_mb: 100
schema_config:
configs:
- from: 2024-01-01
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
# 7 天保留,避免磁盘无限增长
limits_config:
retention_period: 168h
max_query_series: 1000
# 允许采集历史日志(容器启动时的旧日志也能入库),靠 retention_period 控制总量
reject_old_samples: false
ingestion_rate_mb: 20
ingestion_burst_size_mb: 40
per_stream_rate_limit: 10MB
per_stream_rate_limit_burst: 40MB
compactor:
working_directory: /loki/compactor
compaction_interval: 10m
retention_enabled: true
retention_delete_delay: 2h
retention_delete_worker_count: 150
delete_request_store: filesystem