update
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
VERS='5.1.57-01062024'
|
VERS='5.1.58-01062024'
|
||||||
NM_BETA=false
|
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 '
|
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 '
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ STATUS_NODE(){
|
|||||||
if [ "${checkhost}" != "false" ] && [ "${checkhostssl}" == "ok" ]; then
|
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=""
|
[ "${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 [ "${cpu_usage}" != "" ]; then
|
||||||
if [ $(ROUND_NUMBER ${cpu_usage}) -lt 1 ]; then
|
if [ $(ROUND_NUMBER ${cpu_usage}) -lt 40 ]; then
|
||||||
CUFC="${idsCL[Green]}"
|
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.warn ] || [ -f ${NM_TMPFOLDER}/${nip}.cpu_usage.warn ]; then
|
||||||
if [ ! -f ${NM_TMPFOLDER}/${nip}.cpu_usage.norm ]; 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
|
[ -f ${NM_TMPFOLDER}/${nip}.cpu_usage.norm ] && rm -f ${NM_TMPFOLDER}/${nip}.cpu_usage.norm
|
||||||
if [ ! -f ${NM_TMPFOLDER}/${nip}.cpu_usage.warn ]; then
|
if [ ! -f ${NM_TMPFOLDER}/${nip}.cpu_usage.warn ]; then
|
||||||
touch ${NM_TMPFOLDER}/${nip}.cpu_usage.warn
|
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}%"
|
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
|
touch ${NM_TMPFOLDER}/${nip}.cpu_usage.warn
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user