summaryrefslogtreecommitdiffstats
path: root/plugins.d
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-02-17 02:41:22 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-02-17 02:41:22 +0200
commit22b0bd9000c51785aa8d323a02980efd89790ef5 (patch)
tree42c368d5b92a70dc77b83fdecf27ec364a1ec9ca /plugins.d
parent9aec1b88d3d6a25fa68ab63f03c024cb54911017 (diff)
fix rendering and return code check of hipchat notifications
Diffstat (limited to 'plugins.d')
-rwxr-xr-xplugins.d/alarm-notify.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins.d/alarm-notify.sh b/plugins.d/alarm-notify.sh
index 3a26ea7488..2b385f7f44 100755
--- a/plugins.d/alarm-notify.sh
+++ b/plugins.d/alarm-notify.sh
@@ -885,8 +885,8 @@ send_hipchat() {
-H "Authorization: Bearer ${authtoken}" \
-d "{\"color\": \"${color}\", \"from\": \"${netdata}\", \"message_format\": \"${msg_format}\", \"message\": \"${message}\", \"notify\": \"${notify}\"}" \
"https://api.hipchat.com/v2/room/${room}/notification")
-
- if [ "${httpcode}" == "200" ]
+
+ if [ "${httpcode}" == "204" ]
then
info "sent HipChat notification for: ${host} ${chart}.${name} is ${status} to '${room}'"
sent=$((sent + 1))
@@ -1286,12 +1286,10 @@ SENT_PD=$?
send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" "\
<b>${alarm}</b> ${info_html}<br/>&nbsp;\
-<small><b>${chart}</b><br/>Chart<br/>&nbsp;</small>\
-<small><b>${family}</b><br/>Family<br/>&nbsp;</small>\
-<small><b>${severity}</b><br/>Severity<br/>&nbsp;</small>\
-<small><b>${date}${raised_for_html}</b><br/>Time<br/>&nbsp;</small>\
-<a href=\\\"${goto_url}\\\">View Netdata</a><br/>&nbsp;\
-<small><small>The source of this alarm is line ${src}</small></small>\
+${host} <b>${severity}</b> on chart <b>${chart}</b><br/> (family <b>${family}</b><br/>)\
+Time <b>${date}${raised_for_html}</b><br/>\
+<a href=\\\"${goto_url}\\\">View Netdata</a>\
+(the source of this alarm is line ${src})\
"
SENT_HIPCHAT=$?