added system check (draft)
This commit is contained in:
parent
01f2f993e9
commit
7fd687ba60
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
# file: system.sh
|
||||||
|
# version: 0.1
|
||||||
|
# author: david@socialnerds.org
|
||||||
|
#
|
||||||
|
# description: this script checks for local system health and
|
||||||
|
# fires if values exeed a certain threshold
|
||||||
|
#
|
||||||
|
# changelog: [11/22/2020] - file created
|
||||||
|
|
||||||
|
|
||||||
|
# **** configuration ****
|
||||||
|
|
||||||
|
CHECKS="load memory disk_usage"
|
||||||
|
|
||||||
|
|
||||||
|
# **** functions ****
|
||||||
|
|
||||||
|
load() {
|
||||||
|
local THRESHOLD=$1
|
||||||
|
}
|
||||||
|
|
||||||
|
memory() {
|
||||||
|
pass
|
||||||
|
}
|
||||||
|
|
||||||
|
disk_usage() {
|
||||||
|
pass
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# **** loop through checks
|
||||||
|
for CHECK in $CHECKS; do
|
||||||
|
pass
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# ping on success
|
||||||
|
# ping ../fail on failure
|
||||||
|
# provide payload (log output/error message)
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue