From f7f0039f9cad9fd9fd9c1213a9db8364f2363ed3 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Sat, 14 Feb 2026 19:00:12 +0100 Subject: [PATCH] Fixed some prometheus settings. --- nix-system-configs/modules/system/traefik.nix | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/nix-system-configs/modules/system/traefik.nix b/nix-system-configs/modules/system/traefik.nix index 4dc5240..bed085e 100644 --- a/nix-system-configs/modules/system/traefik.nix +++ b/nix-system-configs/modules/system/traefik.nix @@ -97,6 +97,33 @@ in { enable = true; }; + services.prometheus = { + enable = true; + port = 9001; + + exporters.node = { + enabledCollectors = [ + "ethtool" + "softirqs" + "systemd" + "tcpstat" + ]; + enable = true; + port = 9002; + }; + globalConfig.scrape_interval = "5s"; # "1m" + scrapeConfigs = [ + { + job_name = "traefik"; + static_configs = [ + { + targets = ["localhost:8080"]; + } + ]; + } + ]; + }; + # See: https://github.com/grafana/alloy/blob/bbe11b0f6a3bd3391108b2d27122c654c535dd8d/docs/sources/set-up/migrate/from-promtail.md environment.etc."alloy/config.alloy" = { text = ''