From 4a6483b6b36fa3390e9b2bd03eb966dfb97c9af3 Mon Sep 17 00:00:00 2001 From: xqtc161 Date: Fri, 5 Jul 2024 15:22:22 +0200 Subject: [PATCH] Working Loki + promtail --- .../beleth/config-files/loki-config.yaml | 58 ++++++------------- .../beleth/config-files/promtail.yaml | 2 +- hosts/x86_64-linux/beleth/monitoring.nix | 1 + 3 files changed, 19 insertions(+), 42 deletions(-) diff --git a/hosts/x86_64-linux/beleth/config-files/loki-config.yaml b/hosts/x86_64-linux/beleth/config-files/loki-config.yaml index 2e60a0d..0f69ce2 100644 --- a/hosts/x86_64-linux/beleth/config-files/loki-config.yaml +++ b/hosts/x86_64-linux/beleth/config-files/loki-config.yaml @@ -1,54 +1,30 @@ + +# This is a complete configuration to deploy Loki backed by the filesystem. +# The index will be shipped to the storage via tsdb-shipper. + auth_enabled: false server: http_listen_port: 3100 - grpc_listen_port: 9096 - log_level: debug - grpc_server_max_concurrent_streams: 1000 common: - instance_addr: 127.0.0.1 - path_prefix: /tmp/loki - storage: - filesystem: - chunks_directory: /tmp/loki/chunks - rules_directory: /tmp/loki/rules - replication_factor: 1 ring: + instance_addr: 127.0.0.1 kvstore: store: inmemory - -ingester_rf1: - enabled: false - -query_range: - results_cache: - cache: - embedded_cache: - enabled: true - max_size_mb: 100 + replication_factor: 1 + path_prefix: /tmp/loki schema_config: configs: - - from: 2020-10-24 - store: tsdb - object_store: filesystem - schema: v13 - index: - prefix: index_ - period: 24h + - from: 2020-05-15 + store: tsdb + object_store: filesystem + schema: v13 + index: + prefix: index_ + period: 24h -pattern_ingester: - enabled: true - metric_aggregation: - enabled: true - log_push_observations: true - -# ruler: -# alertmanager_url: http://localhost:9093 - -frontend: - encoding: protobuf - -analytics: - reporting_enabled: false +storage_config: + filesystem: + directory: /tmp/loki/chunks diff --git a/hosts/x86_64-linux/beleth/config-files/promtail.yaml b/hosts/x86_64-linux/beleth/config-files/promtail.yaml index c4082e1..c77d810 100644 --- a/hosts/x86_64-linux/beleth/config-files/promtail.yaml +++ b/hosts/x86_64-linux/beleth/config-files/promtail.yaml @@ -14,7 +14,7 @@ scrape_configs: max_age: 12h labels: job: systemd-journal - host: chrysalis + host: beleth relabel_configs: - source_labels: ["__journal__systemd_unit"] target_label: "unit" diff --git a/hosts/x86_64-linux/beleth/monitoring.nix b/hosts/x86_64-linux/beleth/monitoring.nix index 42efde4..5570e98 100644 --- a/hosts/x86_64-linux/beleth/monitoring.nix +++ b/hosts/x86_64-linux/beleth/monitoring.nix @@ -9,6 +9,7 @@ port = 2342; addr = "127.0.0.1"; domain = "grafana.heroin.trade"; + analytics.reporting.enable = false; }; systemd.services.promtail = {