From 178fa5e0648b7bb4a1bce022404d99a02f231716 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 6 Jan 2022 20:17:49 +0100 Subject: vidhar: prometheus: systemd --- hosts/vidhar/prometheus/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'hosts/vidhar/prometheus') diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix index 776b2c43..c38ea16c 100644 --- a/hosts/vidhar/prometheus/default.nix +++ b/hosts/vidhar/prometheus/default.nix @@ -23,10 +23,7 @@ in { exporters = { node = { enable = true; - enabledCollectors = ["systemd"]; - extraFlags = [ - "--collector.systemd.unit-include=(dhcpcd-dsl|pppd-telekom|corerad|ndppd)\.service" - ]; + enabledCollectors = []; }; smartctl = { enable = true; @@ -68,6 +65,12 @@ in { '') (concatLists (mapAttrsToList (host: hostKeys: map (nameValuePair host) hostKeys) keys))); }; apcupsd.enable = true; + systemd = { + enable = true; + extraFlags = [ + "--collector.unit-whitelist=(dhcpcd-dsl|pppd-telekom|corerad|ndppd)\.service" + ]; + }; }; scrapeConfigs = [ @@ -85,6 +88,13 @@ in { relabel_configs = relabelHosts; scrape_interval = "1s"; } + { job_name = "systemd"; + static_configs = [ + { targets = ["localhost:${toString config.services.prometheus.exporters.systemd.port}"]; } + ]; + relabel_configs = relabelHosts; + scrape_interval = "1s"; + } { job_name = "smartctl"; static_configs = [ { targets = ["localhost:${toString config.services.prometheus.exporters.smartctl.port}"]; } -- cgit v1.2.3