summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-01-07 01:42:06 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-01-07 01:42:06 +0100
commit171f41bd417806ce6d4eae3e6563beb77ffa84c2 (patch)
treeb172d1607d0c093b887191f1181b78d4b3d6823c /hosts
parent6bbb46479aa080bbeec4e21bf14d949362746b4d (diff)
downloadnixos-171f41bd417806ce6d4eae3e6563beb77ffa84c2.tar
nixos-171f41bd417806ce6d4eae3e6563beb77ffa84c2.tar.gz
nixos-171f41bd417806ce6d4eae3e6563beb77ffa84c2.tar.bz2
nixos-171f41bd417806ce6d4eae3e6563beb77ffa84c2.tar.xz
nixos-171f41bd417806ce6d4eae3e6563beb77ffa84c2.zip
vidhar: ...
Diffstat (limited to 'hosts')
-rw-r--r--hosts/vidhar/prometheus/default.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix
index e305ff84..f4e8d7e5 100644
--- a/hosts/vidhar/prometheus/default.nix
+++ b/hosts/vidhar/prometheus/default.nix
@@ -210,6 +210,22 @@ in {
210 } 210 }
211 ]; 211 ];
212 } 212 }
213 { name = "apcupsd-transfers";
214 rules = [
215 { record = "apcupsd_last_transfer_on_battery_counter_seconds";
216 expr = "timestamp(apcupsd_last_transfer_on_battery_time_seconds) - (apcupsd_last_transfer_on_battery_time_seconds > 0)";
217 }
218 { record = "apcupsd_last_transfer_on_battery_counter_seconds:resets_per_hour";
219 expr = "resets(apcupsd_last_transfer_on_battery_counter_seconds[1h])";
220 }
221 { record = "apcupsd_last_transfer_on_battery_counter_seconds:resets_per_day";
222 expr = "resets(apcupsd_last_transfer_on_battery_counter_seconds[1d])";
223 }
224 { record = "apcupsd_last_transfer_on_battery_counter_seconds:resets_per_wook";
225 expr = "resets(apcupsd_last_transfer_on_battery_counter_seconds[1w])";
226 }
227 ];
228 }
213 ]; 229 ];
214 }) 230 })
215 ]; 231 ];