Update status.inc

This commit is contained in:
2024-01-06 21:29:06 -06:00
parent 743a798d62
commit 3d3a29332a

View File

@@ -458,7 +458,7 @@ STATUS_NODE(){
[ -f ${NM_TMPFOLDER}/${nip}.cpu_usage.norm ] && rm -f ${NM_TMPFOLDER}/${nip}.cpu_usage.norm
if [ ! -f ${NM_TMPFOLDER}/${nip}.cpu_usage.warn ]; then
touch ${NM_TMPFOLDER}/${nip}.cpu_usage.warn
elif [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.cpu_usage.warn)) -ge 180 ]; then
elif [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.cpu_usage.warn)) -ge 18 ]; then
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}] WARNING HIGH CPU USAGE" "${NM_HOSTNAMES[${nip}]}[${nip}] has high cpu usage: ${cpu_usage}%"
touch ${NM_TMPFOLDER}/${nip}.cpu_usage.warn
fi