diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-02 22:43:01 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-02 22:43:10 +0100 |
commit | bc9b21589df468e36e04f937225106557834a4dc (patch) | |
tree | 8c6913e7ea356451cce33b2432446e6094b268d4 /hosts/vidhar/prometheus/default.nix | |
parent | b405b7212743a9412626234443c85960473f4ac2 (diff) | |
download | nixos-bc9b21589df468e36e04f937225106557834a4dc.tar nixos-bc9b21589df468e36e04f937225106557834a4dc.tar.gz nixos-bc9b21589df468e36e04f937225106557834a4dc.tar.bz2 nixos-bc9b21589df468e36e04f937225106557834a4dc.tar.xz nixos-bc9b21589df468e36e04f937225106557834a4dc.zip |
vidhar: prometheus: apcupsd
Diffstat (limited to 'hosts/vidhar/prometheus/default.nix')
-rw-r--r-- | hosts/vidhar/prometheus/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
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 { | |||
67 | AllowedIPs = ::/0 | 67 | AllowedIPs = ::/0 |
68 | '') (concatLists (mapAttrsToList (host: hostKeys: map (nameValuePair host) hostKeys) keys))); | 68 | '') (concatLists (mapAttrsToList (host: hostKeys: map (nameValuePair host) hostKeys) keys))); |
69 | }; | 69 | }; |
70 | apcupsd.enable = true; | ||
70 | }; | 71 | }; |
71 | 72 | ||
72 | scrapeConfigs = [ | 73 | scrapeConfigs = [ |
@@ -163,6 +164,13 @@ in { | |||
163 | relabel_configs = relabelHosts; | 164 | relabel_configs = relabelHosts; |
164 | scrape_interval = "1s"; | 165 | scrape_interval = "1s"; |
165 | } | 166 | } |
167 | { job_name = "apcupsd"; | ||
168 | static_configs = [ | ||
169 | { targets = ["localhost:${toString config.services.prometheus.exporters.apcupsd.port}"]; } | ||
170 | ]; | ||
171 | relabel_configs = relabelHosts; | ||
172 | scrape_interval = "1s"; | ||
173 | } | ||
166 | ]; | 174 | ]; |
167 | }; | 175 | }; |
168 | users.users.${config.services.prometheus.exporters.unbound.user} = { | 176 | users.users.${config.services.prometheus.exporters.unbound.user} = { |