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 = ''