summaryrefslogtreecommitdiffstats
path: root/health
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2021-07-21 10:42:14 +0300
committerGitHub <noreply@github.com>2021-07-21 10:42:14 +0300
commit93a09d671311bd313bf8f7d0343c4873d8f21fe1 (patch)
treec4e2e2fb64ac1abc9260cd8c8fe231ad550fa7b4 /health
parent6f1532170c9cb10755b49d17dfd187be47a2aa16 (diff)
fix sending MS Teams notifications to multiple channels (#11355)
Diffstat (limited to 'health')
-rwxr-xr-xhealth/notifications/alarm-notify.sh.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in
index 58e44d3d88..ed423fb4e8 100755
--- a/health/notifications/alarm-notify.sh.in
+++ b/health/notifications/alarm-notify.sh.in
@@ -1388,15 +1388,15 @@ EOF
)"
# Replacing in the webhook CHANNEL string by the MS Teams channel name from conf file.
- webhook="${webhook//CHANNEL/${channel}}"
+ cur_webhook="${webhook//CHANNEL/${channel}}"
- httpcode=$(docurl -H "Content-Type: application/json" -d "${payload}" "${webhook}")
+ httpcode=$(docurl -H "Content-Type: application/json" -d "${payload}" "${cur_webhook}")
if [ "${httpcode}" = "200" ]; then
- info "sent Microsoft team notification for: ${host} ${chart}.${name} is ${status} to '${webhook}'"
+ info "sent Microsoft team notification for: ${host} ${chart}.${name} is ${status} to '${cur_webhook}'"
sent=$((sent + 1))
else
- error "failed to send Microsoft team notification for: ${host} ${chart}.${name} is ${status} to '${webhook}', with HTTP response status code ${httpcode}."
+ error "failed to send Microsoft team notification for: ${host} ${chart}.${name} is ${status} to '${cur_webhook}', with HTTP response status code ${httpcode}."
fi
done