This commit is contained in:
2024-01-06 21:30:13 -06:00
parent 3d3a29332a
commit c495dc2e0e
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERS='5.1.57-01062024'
VERS='5.1.58-01062024'
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

@@ -443,7 +443,7 @@ STATUS_NODE(){
if [ "${checkhost}" != "false" ] && [ "${checkhostssl}" == "ok" ]; then
[ "${NODETYPE}" != "OFW" ] && cpu_usage=$(ssh -q -o ConnectTimeout=1 -o ConnectionAttempts=1 root@${nip} "/opt/idssys/defaults/get-data.sh cpu-usage") || cpu_usage=""
if [ "${cpu_usage}" != "" ]; then
if [ $(ROUND_NUMBER ${cpu_usage}) -lt 1 ]; then
if [ $(ROUND_NUMBER ${cpu_usage}) -lt 40 ]; then
CUFC="${idsCL[Green]}"
if [ -f ${NM_TMPFOLDER}/${nip}.cpu_usage.warn ] || [ -f ${NM_TMPFOLDER}/${nip}.cpu_usage.warn ]; then
if [ ! -f ${NM_TMPFOLDER}/${nip}.cpu_usage.norm ]; then
@@ -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 18 ]; then
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}%"
touch ${NM_TMPFOLDER}/${nip}.cpu_usage.warn
fi