This commit is contained in:
2019-02-16 17:53:34 -06:00
parent 9b1b50dd98
commit e9477034be
2 changed files with 4 additions and 3 deletions

View File

@@ -141,8 +141,7 @@ STATUS(){
rm -f ${FOLDER}/${nip}.down; rm -f ${FOLDER}/${nip}.errtime
echo "iDS-Node${nid} is back UP! It was down for $(SHOW_TIME ${toterrtime})" | mail -s "iDS-Node${nid}-${nip}-UP" ${STATUS_CHECK_EMAIL}
fi
declare -p NODE_SERVICES
for srvc in "${NODE_SERVICES[@]}"; do
for srvc in "${NODE_SERVICES_CHECK[@]}"; do
if [ "${ST_ACTION}" != "check" ]; then
c=0; cw=22; spc=''
spc1=${cw}-${#NM_SERVICES[${srvc}]}
@@ -339,7 +338,7 @@ STATUS(){
# if [[ $(/sbin/ip -o -4 addr list ens192 | awk '{print $4}' | cut -d/ -f1) == *"${nip}"* ]]; then NCMD=''
# else NCMD="ssh root@${nip}"
# fi
# for srvc in "${NODE_SERVICES[@]}"; do
# for srvc in "${NODE_SERVICES_CHECK[@]}"; do
# if [ "$(${NCMD} systemctl is-active ${srvc})" != "active" ]; then
# if [ ! -f ${FOLDER}/${nip}-${srvc}.down ]; then
# echo "${NM_SERVICES[${srvc}]} is down" | mail -s "iDS-Node${nid}-${nip}" ${STATUS_CHECK_EMAIL}