From cc6512a01c74476f1c98aa20fc49db365a03ebd3 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Thu, 27 Feb 2025 16:26:03 +0000 Subject: [PATCH] Add loki --- redxen.eu/config.mk | 3 +++ redxen.eu/daemons/loki/Containerfile | 11 +++++++++ redxen.eu/daemons/loki/config.yaml | 37 ++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 redxen.eu/daemons/loki/Containerfile create mode 100644 redxen.eu/daemons/loki/config.yaml diff --git a/redxen.eu/config.mk b/redxen.eu/config.mk index eb2656e..8649c36 100644 --- a/redxen.eu/config.mk +++ b/redxen.eu/config.mk @@ -108,6 +108,9 @@ redxen.eu/daemons/grafana/${BUILD_ID_OUT}: %/${BUILD_ID_OUT} : \ redxen.eu/daemons/prometheus/${BUILD_ID_OUT}: %/${BUILD_ID_OUT} : \ %/config.yaml +redxen.eu/daemons/loki/${BUILD_ID_OUT}: %/${BUILD_ID_OUT} : \ + %/config.yaml + # Mail redxen.eu/daemons/opendkim/${BUILD_ID_OUT}: %/${BUILD_ID_OUT} : \ %/trusted_hosts \ diff --git a/redxen.eu/daemons/loki/Containerfile b/redxen.eu/daemons/loki/Containerfile new file mode 100644 index 0000000..c9bbb24 --- /dev/null +++ b/redxen.eu/daemons/loki/Containerfile @@ -0,0 +1,11 @@ +FROM alpine:latest + +RUN --network=host apk add \ + loki + +WORKDIR /etc/redxen/loki/ + +ADD config.yaml config.yaml + +CMD ["loki", \ + "-config.file=config.yaml"] diff --git a/redxen.eu/daemons/loki/config.yaml b/redxen.eu/daemons/loki/config.yaml new file mode 100644 index 0000000..a8e7411 --- /dev/null +++ b/redxen.eu/daemons/loki/config.yaml @@ -0,0 +1,37 @@ +auth_enabled: false + +server: + http_listen_address: 0.0.0.0 + http_listen_port: 7553 + register_instrumentation: true + +common: + ring: + instance_addr: 127.0.0.1 + kvstore: + store: inmemory + replication_factor: 1 + path_prefix: /var/lib/loki + +compactor: + working_directory: /var/lib/loki/compactor + compaction_interval: 1h + +schema_config: + configs: + - from: 2024-10-07 + store: tsdb + object_store: filesystem + schema: v13 + index: + prefix: index_ + period: 24h + +storage_config: + filesystem: + directory: /var/lib/loki/chunks + +limits_config: + reject_old_samples: true + reject_old_samples_max_age: 24h + max_query_series: 10000