46 lines
595 B
Bash
46 lines
595 B
Bash
#!/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
|