This commit is contained in:
2024-01-06 22:58:55 -06:00
parent 51a0779fea
commit 91969e380b
2 changed files with 3 additions and 3 deletions

View File

@@ -445,8 +445,8 @@ STATUS_NODE(){
[ "${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 [ "${NM_HOST_CPULEVELS[${nip}]}" != "" ]; then
echo ${NM_HOST_CPULEVELS[${nip}]} | cut -d',' -f 1 | read cpu_warn
echo ${NM_HOST_CPULEVELS[${nip}]} | cut -d',' -f 2 | read cpu_crit
cpu_warn=$(echo ${NM_HOST_CPULEVELS[${nip}]} | cut -d',' -f 1)
cpu_crit=$(echo ${NM_HOST_CPULEVELS[${nip}]} | cut -d',' -f 2)
else
cpu_warn=40
cpu_crit=80