This commit is contained in:
Cory Hawkless 2022-10-03 14:27:26 +10:30
parent 86530cc862
commit 2b1bf7f6d2
1 changed files with 3 additions and 3 deletions

View File

@ -128,14 +128,14 @@ do
if [[ cntNotify -gt 0 ]]; then
echo "Sending an alert" >> ${tmpLog}
# need a pagerduty alert if all important members are down
# if [[ cntMembers -eq cntMembersDown ]]; then
if [[ cntMembersDown >1 ]]; then
#response=$(cat ${tmpLog} | ./pd-trigger.sh -L -s "${txtPdServiceKey}" -d "${status}")
#fi
# attempt an email
#cat ${tmpLog} | mail -s "${txtSubject}:${status}" ${txtEmail};
echo "All members down sending slack alert with /usr/local/bin/slacker -c ${txtSlackChannel} -t ${txtSlackBotToken}" >> ${tmpLog}
cat ${tmpLog} | slacker -c ${txtSlackChannel} -t ${txtSlackBotToken}
# fi
cat ${tmpLog} | /home/ubuntu/.local/bin/slacker -c ${txtSlackChannel} -t ${txtSlackBotToken}
fi
fi
fi