Adding ucode & UPS definitions to IAC
This commit is contained in:
2
roles/Sharingan/files/monit/checks/cyberpower
Normal file
2
roles/Sharingan/files/monit/checks/cyberpower
Normal 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!"
|
@@ -1 +1,2 @@
|
||||
include "/etc/monit.d/checks/system"
|
||||
include "/etc/monit.d/checks/cyberpower"
|
||||
|
6
roles/Sharingan/files/monit/scripts/check-cyberpower
Executable file
6
roles/Sharingan/files/monit/scripts/check-cyberpower
Executable 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
|
Reference in New Issue
Block a user