From 2b718e4d4958b6d26baa8406a707b720387d5f47 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Sat, 22 Jul 2023 08:26:29 -0700 Subject: [PATCH] Use tsdb for loki, set retention for prometheus --- lotus-land-story/loki.yml | 10 ++++++++++ lotus-land-story/prometheus.yml | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/lotus-land-story/loki.yml b/lotus-land-story/loki.yml index 8489017..75adf32 100644 --- a/lotus-land-story/loki.yml +++ b/lotus-land-story/loki.yml @@ -55,6 +55,16 @@ index: prefix: index_ period: 24h + + # https://grafana.com/docs/loki/latest/operations/storage/tsdb/ + - from: 2023-07-17 + index: + period: 24h + prefix: index_ + object_store: filesystem + schema: v12 + store: tsdb + storage_config: filesystem: directory: /data diff --git a/lotus-land-story/prometheus.yml b/lotus-land-story/prometheus.yml index c1d66fa..0cedbb8 100644 --- a/lotus-land-story/prometheus.yml +++ b/lotus-land-story/prometheus.yml @@ -58,6 +58,10 @@ # restart: true name: prometheus image: prom/prometheus:v2.43.0 + command: + - --config.file=/etc/prometheus/prometheus.yml + - --storage.tsdb.retention.size=5GB + restart: true user: "{{ prometheus_user.uid }}" groups: "{{ prometheus_user.group }}" volumes: