add retention period; update loki
This commit is contained in:
parent
ceb851060a
commit
30f2a52622
@ -29,6 +29,9 @@ DOMAIN=monitoring.example.com
|
|||||||
# Loki Server
|
# Loki Server
|
||||||
#
|
#
|
||||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.loki.yml"
|
# COMPOSE_FILE="$COMPOSE_FILE:compose.loki.yml"
|
||||||
|
#
|
||||||
|
# Set to 0 to disable retention
|
||||||
|
# LOKI_RETENTION_PERIOD=744h
|
||||||
# LOKI_STORAGE_FILESYSTEM=1
|
# LOKI_STORAGE_FILESYSTEM=1
|
||||||
#
|
#
|
||||||
## S3 Storage
|
## S3 Storage
|
||||||
|
@ -2,7 +2,7 @@ version: '3.8'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
loki:
|
loki:
|
||||||
image: grafana/loki:2.0.0
|
image: grafana/loki:2.8.2
|
||||||
# entrypoint: 'tail -f /dev/null'
|
# entrypoint: 'tail -f /dev/null'
|
||||||
command: -config.file=/etc/loki/local-config.yaml
|
command: -config.file=/etc/loki/local-config.yaml
|
||||||
networks:
|
networks:
|
||||||
@ -19,6 +19,7 @@ services:
|
|||||||
- LOKI_AWS_ENDPOINT
|
- LOKI_AWS_ENDPOINT
|
||||||
- LOKI_AWS_REGION
|
- LOKI_AWS_REGION
|
||||||
- LOKI_BUCKET_NAMES
|
- LOKI_BUCKET_NAMES
|
||||||
|
- LOKI_RETENTION_PERIOD
|
||||||
- STACK_NAME
|
- STACK_NAME
|
||||||
- LOKI_STORAGE_FILESYSTEM
|
- LOKI_STORAGE_FILESYSTEM
|
||||||
- LOKI_STORAGE_S3
|
- LOKI_STORAGE_S3
|
||||||
|
@ -34,7 +34,8 @@ ingester:
|
|||||||
chunk_target_size: 1048576 # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first
|
chunk_target_size: 1048576 # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first
|
||||||
chunk_retain_period: 30s # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m)
|
chunk_retain_period: 30s # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m)
|
||||||
max_transfer_retries: 0 # Chunk transfers disabled
|
max_transfer_retries: 0 # Chunk transfers disabled
|
||||||
|
wal:
|
||||||
|
dir: "/tmp/wal"
|
||||||
|
|
||||||
memberlist:
|
memberlist:
|
||||||
abort_if_cluster_join_fails: false
|
abort_if_cluster_join_fails: false
|
||||||
@ -102,11 +103,16 @@ storage_config:
|
|||||||
compactor:
|
compactor:
|
||||||
working_directory: /loki/boltdb-shipper-compactor
|
working_directory: /loki/boltdb-shipper-compactor
|
||||||
shared_store: filesystem
|
shared_store: filesystem
|
||||||
|
compaction_interval: 10m
|
||||||
|
retention_enabled: true
|
||||||
|
retention_delete_delay: 2h
|
||||||
|
retention_delete_worker_count: 150
|
||||||
|
|
||||||
limits_config:
|
limits_config:
|
||||||
enforce_metric_name: false
|
enforce_metric_name: false
|
||||||
reject_old_samples: true
|
reject_old_samples: true
|
||||||
reject_old_samples_max_age: 168h
|
reject_old_samples_max_age: 168h
|
||||||
|
retention_period: {{ env "LOKI_RETENTION_PERIOD" }}
|
||||||
|
|
||||||
chunk_store_config:
|
chunk_store_config:
|
||||||
max_look_back_period: 0s
|
max_look_back_period: 0s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user