This commit is contained in:
2024-03-13 09:31:48 -05:00
parent d8996973e0
commit a88059ee71
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='5.1.101-03102024'
VERS='5.1.102-03132024'
NM_BETA=false
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log betacheck '

View File

@@ -494,7 +494,7 @@ STATUS_NODE(){
if [ ! -f ${NM_TMPFOLDER}/${nip}.cpu_usage.norm ]; then
echo "${cpu_usage}%" >| ${NM_TMPFOLDER}/${nip}.cpu_usage.norm
elif [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.cpu_usage.norm)) -ge 180 ]; then
[ -f ${NM_TMPFOLDER}/${nip}.cpu_usage.sent ] && SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}] NORMAL CPU USAGE" "${NM_HOSTNAMES[${nip}]}[${nip}] has returned to normal cpu usage: ${cpu_usage}%"
# [ -f ${NM_TMPFOLDER}/${nip}.cpu_usage.sent ] && SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}] NORMAL CPU USAGE" "${NM_HOSTNAMES[${nip}]}[${nip}] has returned to normal cpu usage: ${cpu_usage}%"
rm -f ${NM_TMPFOLDER}/${nip}.cpu_usage.*
fi
fi
@@ -504,7 +504,7 @@ STATUS_NODE(){
if [ ! -f ${NM_TMPFOLDER}/${nip}.cpu_usage.warn ]; then
echo "${cpu_usage}%" >| ${NM_TMPFOLDER}/${nip}.cpu_usage.warn
elif [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.cpu_usage.warn)) -ge 180 ]; then
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}] WARNING HIGH CPU USAGE" "${NM_HOSTNAMES[${nip}]}[${nip}] has high cpu usage: ${cpu_usage}%"
# SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}] WARNING HIGH CPU USAGE" "${NM_HOSTNAMES[${nip}]}[${nip}] has high cpu usage: ${cpu_usage}%"
echo "${cpu_usage}%" >| ${NM_TMPFOLDER}/${nip}.cpu_usage.warn
touch ${NM_TMPFOLDER}/${nip}.cpu_usage.sent
fi