Update nodemgmt-scripts.sh
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user