This commit is contained in:
2023-11-25 18:19:47 -06:00
parent fd47efce84
commit 2897931043
4 changed files with 41 additions and 10 deletions

View File

@@ -478,7 +478,7 @@ CHECK_DOCKER_SERVICES(){
if [ "${ST_ACTION}" != "check" ]; then
echo -en " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}"
uptime=`${NCMD} uptime -p`
echo -e "${idsCL[LightCyan]} - ${uptime} ${idsCL[LightYello]}${LH}${idsCL[Default]}"
echo -e "${idsCL[LightCyan]} - ${uptime} ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
DIVIDER false green
fi
if [ -f ${NM_TMPFOLDER}/${nip}.down ]; then
@@ -531,7 +531,7 @@ CHECK_DOCKER_SERVICES(){
fi
if [ "${ST_ACTION}" != "check" ]; then
toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime)
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Red]} - Node has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYello]}${LH}${idsCL[Default]}"
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Red]} - Node has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
fi
fi
if [ "${ST_ACTION}" != "check" ]; then echo; fi

View File

@@ -61,7 +61,7 @@ STATUS(){
echo -en " ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME} (${lip})${idsST[Reset]}"
if ([ "${ST_ACTION}" == "report" ] && [ "${2}" == "email" ]) || [ "${ST_ACTION}" != "report" ]; then
uptime=`uptime -p`
echo -e "${idsCL[LightCyan]} - ${uptime} ${idsCL[LightYello]}- localhost${idsCL[Default]}"
echo -e "${idsCL[LightCyan]} - ${uptime} ${idsCL[LightYellow]}- localhost${idsCL[Default]}"
else
echo -e "${idsCL[Default]}"
fi
@@ -186,7 +186,7 @@ STATUS(){
uptime=$(${NCMD} uptime -p)
fi
echo -e "${idsCL[LightCyan]} - ${uptime} ${idsCL[LightYello]}${LH}${idsCL[Default]}"
echo -e "${idsCL[LightCyan]} - ${uptime} ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
else
echo -e "${idsCL[Default]}"
fi
@@ -460,9 +460,9 @@ STATUS(){
errtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}.down)
if [ "${ST_ACTION}" != "check" ]; then
if [ "${checkhost}" != "false" ]; then
echo -e "${idsCL[Red]} - Node SSL has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYello]}${LH}${idsCL[Default]}"
echo -e "${idsCL[Red]} - Node SSL has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
else
echo -e "${idsCL[Red]} - Node has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYello]}${LH}${idsCL[Default]}"
echo -e "${idsCL[Red]} - Node has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
fi
fi
if [ $errtime -gt ${NM_RENOTIFY_TIMEOUT} ]; then
@@ -659,7 +659,7 @@ It was down for $(SHOW_TIME ${toterrtime})"
else NCMD="ssh root@${nip}"; LH=''
fi
if [ "${ST_ACTION}" != "check" ]; then
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]} [${nip}]${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYello]}${LH}${idsCL[Default]}"
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]} [${nip}]${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
DIVIDER false green
fi