Update nodemgmt-scripts.sh

This commit is contained in:
2023-11-08 21:06:54 -06:00
parent 9ea2d0ef16
commit 1c6fb483a6

View File

@@ -715,16 +715,22 @@ DOWNLIST(){
else
echo -e "${idsCL[LightGreen]}Current List of Items Down...${idsCL[Default]}"
DIVIDER false yellow 95
echo -e "${idsCL[Yellow]}Service/Host Host Down_Time${idsCL[Default]}"
[ "${1}" == "ignore" ] && ignsel=" " || ignsel=""
echo -e "${idsCL[Yellow]}${ignsel}Service/Host Host Down_Time${idsCL[Default]}"
DIVIDER false yellow 95
cw=50; cw2=65
cw=50; cw2=65; is=1;
for downitem in ${DOWN_LIST}; do
ditem=${downitem##*/}
ditem=${ditem//.down}
host=${ditem%%~*}
item=${ditem#*~}
if [ "${1}" == "ignore" ]; then
if [ ${is} -lt 10 ] && ignsel=" ${is})" || ignsel="${is})"
else
ignsel=""
fi
if [[ $ditem == *"~"* ]] && [ "${NM_SERVICE_DESC[${item}]}" != "" ]; then
itemname=${NM_SERVICE_DESC[${item}]}
elif [[ $ditem == *"~"* ]] && [ "${NM_DOCKER_DESC[${item}]}" != "" ]; then
@@ -749,7 +755,7 @@ DOWNLIST(){
c=0; spc2=''
spc1=${cw2}-${#itemname}-${#host}-${spc1}
until [ $c = ${spc1} ]; do spc2="${spc2} "; c=`expr $c + 1`; done
echo -e "${idsST[Bold]}${idsCL[Red]}${itemname}${spc}${host}${spc2}$(SHOW_TIME ${toterrtime})${idsST[Reset]}${idsCL[Default]}"
echo -e "${ignsel}${idsST[Bold]}${idsCL[Red]}${itemname}${spc}${host}${spc2}$(SHOW_TIME ${toterrtime})${idsST[Reset]}${idsCL[Default]}"
DIVIDER false darkGray 90
done
fi