From 415989e875535a6ee17f905ff06683397df4146d Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Tue, 17 Sep 2024 13:13:30 +0700 Subject: [PATCH] alloy: added json pipeline --- system/services/telemetry/alloy.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/system/services/telemetry/alloy.nix b/system/services/telemetry/alloy.nix index 3b95a89..644cee8 100644 --- a/system/services/telemetry/alloy.nix +++ b/system/services/telemetry/alloy.nix @@ -126,7 +126,7 @@ in } loki.source.journal "read" { - forward_to = [loki.write.default.receiver] + forward_to = [loki.process.general_json_pipeline.receiver] relabel_rules = loki.relabel.journal.rules labels = { job = "systemd-journal", @@ -134,6 +134,22 @@ in } } + loki.process "general_json_pipeline" { + forward_to = [loki.write.default.receiver] + + stage.json { + expressions = { + level = "level", + } + } + + stage.labels { + values = { + level = "", + } + } + } + otelcol.exporter.otlp "tempo" { client { endpoint = "${tempoServer.http_listen_address}:${toString tempoServer.http_listen_port}"