feat(loki): enable 7d retention via compactor
This commit is contained in:
@@ -16,13 +16,6 @@ common:
|
|||||||
kvstore:
|
kvstore:
|
||||||
store: inmemory
|
store: inmemory
|
||||||
|
|
||||||
query_range:
|
|
||||||
results_cache:
|
|
||||||
cache:
|
|
||||||
embedded_cache:
|
|
||||||
enabled: true
|
|
||||||
max_size_mb: 100
|
|
||||||
|
|
||||||
schema_config:
|
schema_config:
|
||||||
configs:
|
configs:
|
||||||
- from: 2020-10-24
|
- from: 2020-10-24
|
||||||
@@ -37,11 +30,20 @@ ruler:
|
|||||||
alertmanager_url: http://localhost:9093
|
alertmanager_url: http://localhost:9093
|
||||||
|
|
||||||
limits_config:
|
limits_config:
|
||||||
|
retention_period: 168h
|
||||||
reject_old_samples: true
|
reject_old_samples: true
|
||||||
reject_old_samples_max_age: 168h
|
reject_old_samples_max_age: 168h
|
||||||
ingestion_rate_mb: 16
|
ingestion_rate_mb: 16
|
||||||
ingestion_burst_size_mb: 24
|
ingestion_burst_size_mb: 32
|
||||||
|
max_query_series: 5000
|
||||||
allow_structured_metadata: true
|
allow_structured_metadata: true
|
||||||
|
|
||||||
|
compactor:
|
||||||
|
working_directory: /loki/compactor
|
||||||
|
compaction_interval: 10m
|
||||||
|
retention_enabled: true
|
||||||
|
retention_delete_delay: 2h
|
||||||
|
delete_request_store: filesystem
|
||||||
|
|
||||||
analytics:
|
analytics:
|
||||||
reporting_enabled: false
|
reporting_enabled: false
|
||||||
|
|||||||
@@ -74,3 +74,10 @@ class TestNvidiaExporter:
|
|||||||
svc = _services()["nvidia-exporter"]
|
svc = _services()["nvidia-exporter"]
|
||||||
devices = svc["deploy"]["resources"]["reservations"]["devices"]
|
devices = svc["deploy"]["resources"]["reservations"]["devices"]
|
||||||
assert any(d.get("driver") == "nvidia" for d in devices)
|
assert any(d.get("driver") == "nvidia" for d in devices)
|
||||||
|
|
||||||
|
|
||||||
|
class TestLokiRetention:
|
||||||
|
def test_loki_compactor_configured(self):
|
||||||
|
cfg = yaml.safe_load((ROOT / "infra/loki/loki-config.yml").read_text())
|
||||||
|
assert cfg["compactor"]["retention_enabled"] is True
|
||||||
|
assert cfg["limits_config"]["retention_period"] == "168h"
|
||||||
|
|||||||
Reference in New Issue
Block a user