Adding ucode & UPS definitions to IAC

This commit is contained in:
2023-12-21 12:58:32 -06:00
parent e244895552
commit 1ca0272031
9 changed files with 66 additions and 10 deletions

View File

@@ -0,0 +1,2 @@
check program cyberpower with path "/etc/monit.d/scripts/check-cyberpower"
if status != 0 for 5 times within 5 cycles then exec "/etc/monit.d/scripts/critical Host is on UPS power!"

View File

@@ -1 +1,2 @@
include "/etc/monit.d/checks/system"
include "/etc/monit.d/checks/cyberpower"

View File

@@ -0,0 +1,6 @@
#!/bin/bash
if [ `pwrstat -status | sed 's/^\s\+//' | grep -E ^State | awk '{ print $2; }'` != 'Normal' ]; then
exit 2;
fi
exit 0