fix sending MS Teams notifications to multiple channels (#11355)
Ilya Mashchenko committed
Jul 21, 2021 at 10:42 UTC
93a09d671311bd313bf8f7d0343c4873d8f21fe1
1 file changed
+4
-4
health/notifications/alarm-notify.sh.in
+4
-4
@@ -1388,15 +1388,15 @@ EOF
1388
)"
1389
1390
# Replacing in the webhook CHANNEL string by the MS Teams channel name from conf file.
1391
- webhook="${webhook//CHANNEL/${channel}}"
1391
+ cur_webhook="${webhook//CHANNEL/${channel}}"
1392
1393
- httpcode=$(docurl -H "Content-Type: application/json" -d "${payload}" "${webhook}")
1393
+ httpcode=$(docurl -H "Content-Type: application/json" -d "${payload}" "${cur_webhook}")
1394
1395
if [ "${httpcode}" = "200" ]; then
1396
- info "sent Microsoft team notification for: ${host} ${chart}.${name} is ${status} to '${webhook}'"
1396
+ info "sent Microsoft team notification for: ${host} ${chart}.${name} is ${status} to '${cur_webhook}'"
1397
sent=$((sent + 1))
1398
else
1399
- error "failed to send Microsoft team notification for: ${host} ${chart}.${name} is ${status} to '${webhook}', with HTTP response status code ${httpcode}."
1399
+ error "failed to send Microsoft team notification for: ${host} ${chart}.${name} is ${status} to '${cur_webhook}', with HTTP response status code ${httpcode}."
1400
fi
1401
done
1402