From a575d16ec07ff405f207e87a817b2c0dc7d55cee Mon Sep 17 00:00:00 2001 From: ahtlon Date: Wed, 17 Jun 2026 10:29:03 +0200 Subject: [PATCH] Promtail is EOL Recomended migtration to grafana-alloy (https://grafana.com/docs/alloy/latest/set-up/migrate/from-promtail/) or fluent-bit (https://docs.fluentbit.io/manual/data-pipeline/outputs/loki) I chose alloy because of the compatability. This needs to be reworked to a native implementation later --- machines/modules/malobeo/metrics.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/machines/modules/malobeo/metrics.nix b/machines/modules/malobeo/metrics.nix index 9c74b10..4bed4a5 100644 --- a/machines/modules/malobeo/metrics.nix +++ b/machines/modules/malobeo/metrics.nix @@ -41,17 +41,22 @@ in }; }; - services.promtail = { + services.alloy = { enable = cfg.enablePromtail; - configFile = import ./promtail_config.nix { + extraFlags = ["--config.format=promtail"]; #TODO please change this to native alloy config later + configPath = import ./promtail_config.nix { lokiAddress = cfg.lokiHost; logNginx = cfg.logNginx; config = config; pkgs = pkgs; }; }; - - users.users.promtail.extraGroups = [ "systemd-journal" ] ++ (lib.optionals cfg.logNginx [ "nginx" ]) ; + users.groups.promtail = {}; + users.users.promtail = { + isNormalUser = true; + group = "promtail"; + extraGroups = [ "systemd-journal" ] ++ (lib.optionals cfg.logNginx [ "nginx" ]) ; + }; }; }