retention_stream:-selector:'{job="C"}'priority:1period:168h retention_enabled: true是必须写的,如果不写,Compactor 只会压缩表,不会启动保留策略。 retention_delete_delay: 2h是 Compactor 删除 marked chunks 的延迟时间,这里是出于相关引用的考虑。 retention_delete_worker_count: 150是 Compactor 删除chunk...
以下配置均可删除chunk_store_config:max_look_back_period:24h #最大日志可见时间#table_manager:# retention_deletes_enabled: true# retention_period: 24hlimits_config:retention_period:24h #全局保留期,超过这个时间的日志会被删除,具体删除规则在compactor里配置#retention_stream: #局部保留期#- selector:'...
当有任意标签发生变化时会产生新的 hash 值和 refid,对应新的 series loki 处理日志的模式和 prometheus 一致,loki 一组标签值会生成一个 stream。日志随着时间的递增会追加到这个 stream 中,最后压缩为 chunk。当有任意标签发生变化时会产生新的 hash 值,对应新的 stream。 查询过程 所以loki 先根据标签算出 ha...
里配置#retention_stream: #局部保留期#- selector: '{level="error"}'# priority: 1# period: 720hchunk_store_config:max_look_back_period: 0s #最大日志可见时间,0表示一直可见。or 24h等等table_manager:retention_deletes_enabled: falseretention_period: 0scompactor:working_directory: /data/loki/co...
table_manager:retention_deletes_enabled:falseretention_period:0s ruler:storage:type:local local:directory:/opt/app/loki/rules rule_path:/opt/app/loki/rules-temp alertmanager_url:http://localhost:9093ring:kvstore:store:inmemory enable_api:trueEOF# 解压包unzip loki-linux-amd64.zip ...
retention_deletes_enabled:falseretention_period: 0sruler: storage:type:locallocal: directory: /opt/app/loki/rules rule_path: /opt/app/loki/rules-temp alertmanager_url: http://localhost:9093 ring: kvstore: store: inmemory enable_api:trueEOF# 解压包unzip loki-linux-amd64.zip mv loki-linux-...
0s table_manager: retention_deletes_enabled: false retention_period: 0s ruler: storage: type: local local: directory: /opt/app/loki/rules rule_path: /opt/app/loki/rules-temp alertmanager_url: http://localhost:9093 ring: kvstore: store: inmemory enable_api: true EOF # 解压包 unzip loki...
falsetls_insecure_skip_verify: trueschema_config:configs:- from: "2020-10-24"index:period: 24hprefix: index_object_store: filesystemschema: v11store: boltdb-shipperchunks:period: 168hrow_shards: 32table_manager:retention_deletes_enabled: falseretention_period: 0sthroughput_updates_disabled: false...
retention_deletes_enabled:true#日志保留周期开关,默认为falseretention_period: 168h#日志保留周期 loki节点 vim /opt/loki/docker-compose.yaml version:"3"networks: loki: services: loki: image: grafana/loki:2.3.0 restart: always environment:
addresses:{{store_addresses}}chunkStore:directory: /loki-{{lookup('pipe','date +%Y%m%d')}}limits_config:enforce_metric_name: falsereject_old_samples: truereject_old_samples_max_age: 168hchunk_store_config:max_look_back_period: 0stable_manager:retention_deletes_enabled: falseretention_period:...