From bc9b21589df468e36e04f937225106557834a4dc Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 2 Jan 2022 22:43:01 +0100 Subject: vidhar: prometheus: apcupsd --- hosts/vidhar/prometheus/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hosts/vidhar') diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix index af21ee7d..776b2c43 100644 --- a/hosts/vidhar/prometheus/default.nix +++ b/hosts/vidhar/prometheus/default.nix @@ -67,6 +67,7 @@ in { AllowedIPs = ::/0 '') (concatLists (mapAttrsToList (host: hostKeys: map (nameValuePair host) hostKeys) keys))); }; + apcupsd.enable = true; }; scrapeConfigs = [ @@ -163,6 +164,13 @@ in { relabel_configs = relabelHosts; scrape_interval = "1s"; } + { job_name = "apcupsd"; + static_configs = [ + { targets = ["localhost:${toString config.services.prometheus.exporters.apcupsd.port}"]; } + ]; + relabel_configs = relabelHosts; + scrape_interval = "1s"; + } ]; }; users.users.${config.services.prometheus.exporters.unbound.user} = { -- cgit v1.2.3