summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorthomasbeaudry <waveflux@gmail.com>2023-11-13 08:51:31 -0500
committerGitHub <noreply@github.com>2023-11-13 15:51:31 +0200
commit5fb7635057cdeea3a1debfaaf1a63716e03e8af6 (patch)
tree1458d8123d6412ea6efa2cb01fd81fdd8b249cba /health
parent529bc76201e4be6834d58cb5a3aeb5ac994b8bc4 (diff)
Add a apcupsd status code metric (#16361)
Co-authored-by: ilyam8 <ilya@netdata.cloud>
Diffstat (limited to 'health')
-rw-r--r--health/health.d/apcupsd.conf63
1 files changed, 63 insertions, 0 deletions
diff --git a/health/health.d/apcupsd.conf b/health/health.d/apcupsd.conf
index 3c3c66b440..90a72af192 100644
--- a/health/health.d/apcupsd.conf
+++ b/health/health.d/apcupsd.conf
@@ -60,3 +60,66 @@ component: UPS device
delay: up 0 down 15m multiplier 1.5 max 1h
info: APC UPS self-test failed due to insufficient battery capacity or due to overload.
to: sitemgr
+
+#Send out a warning when STATUS code is ONBATT,OVERLOAD,LOWBATT,REPLACEBATT,NOBATT,COMMLOST
+#https://man.archlinux.org/man/apcaccess.8.en#:~:text=apcupsd%20was%20started-,STATUS,-%3A%20UPS%20status.%20One
+
+ template: apcupsd_status_onbatt
+ on: apcupsd.status
+ lookup: max -1s unaligned match-names of ONBATT
+ units: status
+ every: 10s
+ warn: $this == 1
+ delay: up 1m down 15m multiplier 1.5 max 1h
+ info: APC UPS has switched to battery power because the input power has failed
+ to: sitemgr
+
+ template: apcupsd_status_overload
+ on: apcupsd.status
+ lookup: max -1s unaligned match-names of OVERLOAD
+ units: status
+ every: 10s
+ warn: $this == 1
+ delay: up 0 down 15m multiplier 1.5 max 1h
+ info: APC UPS is overloaded and cannot supply enough power to the load
+ to: sitemgr
+
+ template: apcupsd_status_lowbatt
+ on: apcupsd.status
+ lookup: max -1s unaligned match-names of LOWBATT
+ units: status
+ every: 10s
+ warn: $this == 1
+ delay: up 0 down 15m multiplier 1.5 max 1h
+ info: APC UPS battery is low and needs to be recharged
+ to: sitemgr
+
+ template: apcupsd_status_replacebatt
+ on: apcupsd.status
+ lookup: max -1s unaligned match-names of REPLACEBATT
+ units: status
+ every: 10s
+ warn: $this == 1
+ delay: up 0 down 15m multiplier 1.5 max 1h
+ info: APC UPS battery has reached the end of its lifespan and needs to be replaced
+ to: sitemgr
+
+ template: apcupsd_status_nobatt
+ on: apcupsd.status
+ lookup: max -1s unaligned match-names of NOBATT
+ units: status
+ every: 10s
+ warn: $this == 1
+ delay: up 0 down 15m multiplier 1.5 max 1h
+ info: APC UPS has no battery
+ to: sitemgr
+
+ template: apcupsd_status_commlost
+ on: apcupsd.status
+ lookup: max -1s unaligned match-names of COMMLOST
+ units: status
+ every: 10s
+ warn: $this == 1
+ delay: up 0 down 15m multiplier 1.5 max 1h
+ info: APC UPS communication link is lost
+ to: sitemgr