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`

2
run.sh
View File

@@ -11,7 +11,7 @@ if [ "$1" != "service" ] && [ "$1" != "status" ] && [ "$1" != "status-check" ];
echo ""
echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}"
echo -e "Node hostname: ${node_hostname}"
echo -e "Node hostname: ${NODE_HOSTNAME}"
for srvc in "${NODE_SERVICES[@]}"
do
if [ "${srvc}" = "mysql" ]; then SER='MySQL: '