This commit is contained in:
2019-01-29 19:08:07 -06:00
parent 215df5cf61
commit 1ccc0aa4cb
2 changed files with 5 additions and 3 deletions

View File

@@ -161,8 +161,10 @@ case "$1" in
elif [ "${srvc}" = "maxscale" ]; then SER='MaxScale:'
else SER="${2}"
fi
if [ $(${NCMD} pgrep ${srvc} | wc -l) -lt "1" ]; then
echo "${SER} is down" | mail -s "iDS-Node${nid}-${nip}" alerts2external@schroedercity.com
if [ "${STATUS_CHECK_EMAIL}" != "" ]; then
if [ $(${NCMD} pgrep ${srvc} | wc -l) -lt "1" ]; then
echo "${SER} is down" | mail -s "iDS-Node${nid}" ${STATUS_CHECK_EMAIL}
fi
fi
done
nid=`expr $nid + 1`