From 2a40b7e0472835c91be0831e3c2b9ed5a779889d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 10 Dec 2023 21:00:22 +0100 Subject: [PATCH] send logs to loki --- config/services/otel.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/services/otel.nix b/config/services/otel.nix index 1cc2d0f2..18f3c648 100644 --- a/config/services/otel.nix +++ b/config/services/otel.nix @@ -1,6 +1,7 @@ -{config, ...}: { +{config, pkgs, ...}: { services.opentelemetry-collector = { enable = true; + package = pkgs.opentelemetry-collector-contrib; settings = { receivers = { otlp.protocols = { @@ -12,6 +13,9 @@ exporters = { "otlp".endpoint = "nas.int.chir.rs:4317"; otlp.tls.insecure = true; + loki = { + endpoint = "https://nas.int.chir.rs:3100/loki/api/v1/push"; + }; }; extensions = { zpages = {}; @@ -32,7 +36,7 @@ logs = { receivers = ["otlp"]; processors = ["batch"]; - exporters = ["otlp"]; + exporters = ["loki"]; }; }; telemetry = {