From c495dc2e0e195f1dc1cc4d842963dd68e5a7c55a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 6 Jan 2024 21:30:13 -0600 Subject: [PATCH] update --- defaults.inc | 2 +- inc/status.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defaults.inc b/defaults.inc index cf5b4a80..ec8eb9d3 100755 --- a/defaults.inc +++ b/defaults.inc @@ -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 ' diff --git a/inc/status.inc b/inc/status.inc index 2c3cff50..164f780a 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -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