Update nodemgmt-scripts.sh

This commit is contained in:
2021-02-27 09:54:13 -06:00
parent 95eed594da
commit 4e3808e874

View File

@@ -242,6 +242,10 @@ STATUS(){
if [ ! -f ${FOLDER}/${nip}.errtime ]; then
touch ${FOLDER}/${nip}.errtime
fi
if [ "${STATUS_CHECK_EMAIL}" != "" ]; then
echo "${NM_NODETYPES[$NTYPE]}-Node${nid} has been down for $(SHOW_TIME ${toterrtime})" | mail -s "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}" ${STATUS_CHECK_EMAIL}
fi
elif
errtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.down)
if [ $errtime -gt ${RENOTIFY} ] && [ "${STATUS_CHECK_EMAIL}" != "" ]; then
echo "${NM_NODETYPES[$NTYPE]}-Node${nid} has been down for $(SHOW_TIME ${toterrtime})" | mail -s "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}" ${STATUS_CHECK_EMAIL}