@cryptotaxi247 / netdata-1 / commits / fd3de3819

health: add upsd alerts (#16036)

Ilya Mashchenko committed Sep 27, 2023 at 13:23 UTC fd3de3819816c67f69bea105c1e6a801a568084f
2 files changed +51
health/Makefile.am
+1
@@ -94,6 +94,7 @@ dist_healthconfig_DATA = \
94 health.d/tcp_resets.conf \
95 health.d/udp_errors.conf \
96 health.d/unbound.conf \
97 + health.d/upsd.conf \
98 health.d/vcsa.conf \
99 health.d/vernemq.conf \
100 health.d/vsphere.conf \
health/health.d/upsd.conf new
+50
@@ -0,0 +1,50 @@
1 +# you can disable an alarm notification by setting the 'to' line to: silent
2 +
3 + template: upsd_10min_ups_load
4 + on: upsd.ups_load
5 + class: Utilization
6 + type: Power Supply
7 +component: UPS
8 + os: *
9 + hosts: *
10 + lookup: average -10m unaligned of load
11 + units: %
12 + every: 1m
13 + warn: $this > (($status >= $WARNING) ? (70) : (80))
14 + crit: $this > (($status == $CRITICAL) ? (85) : (95))
15 + delay: down 10m multiplier 1.5 max 1h
16 + summary: UPS ${label:ups_name} load
17 + info: UPS ${label:ups_name} average load over the last 10 minutes
18 + to: sitemgr
19 +
20 + template: upsd_ups_battery_charge
21 + on: upsd.ups_battery_charge
22 + class: Errors
23 + type: Power Supply
24 +component: UPS
25 + os: *
26 + hosts: *
27 + lookup: average -60s unaligned of charge
28 + units: %
29 + every: 60s
30 + warn: $this < 75
31 + crit: $this < 40
32 + delay: down 10m multiplier 1.5 max 1h
33 + summary: UPS ${label:ups_name} battery charge
34 + info: UPS ${label:ups_name} average battery charge over the last minute
35 + to: sitemgr
36 +
37 + template: upsd_ups_last_collected_secs
38 + on: upsd.ups_load
39 + class: Latency
40 + type: Power Supply
41 +component: UPS device
42 + calc: $now - $last_collected_t
43 + every: 10s
44 + units: seconds ago
45 + warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
46 + crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
47 + delay: down 5m multiplier 1.5 max 1h
48 + summary: UPS ${label:ups_name} last collected
49 + info: UPS ${label:ups_name} number of seconds since the last successful data collection
50 + to: sitemgr