diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/vidhar/prometheus/default.nix | 16 |
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 | ]; |