From: Costa Tsaousis Date: Fri, 17 Feb 2017 08:20:42 +0000 (+0200) Subject: Merge pull request #1804 from ktsaou/master X-Git-Tag: ab-debian_0.20170221.01-0ab1~1^2~5 X-Git-Url: https://arthur.barton.de/gitweb/?p=netdata.git;a=commitdiff_plain;h=4dcd52bd5895961b23fcb45a189b49ab90a7f402;hp=cb9f18a5960e911d93d59899b1bafd960c8825cd Merge pull request #1804 from ktsaou/master fix hipchat notifications --- diff --git a/plugins.d/alarm-notify.sh b/plugins.d/alarm-notify.sh index c70acc72..997ff96a 100755 --- a/plugins.d/alarm-notify.sh +++ b/plugins.d/alarm-notify.sh @@ -24,7 +24,7 @@ # - kafka notifications by @ktsaou #1342 # - pagerduty.com notifications by Jim Cooley @jimcooley PR #1373 # - messagebird.com notifications by @tech_no_logical #1453 -# - hipchart notifications by @ktsaou #1561 +# - hipchat notifications by @ktsaou #1561 # ----------------------------------------------------------------------------- # testing notifications @@ -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)) @@ -1284,14 +1284,13 @@ SENT_PD=$? # ----------------------------------------------------------------------------- # send hipchat message -send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" " -${alarm} ${info_html}
  -${chart}
Chart
 
-${family}
Family
 
-${severity}
Severity
 
-${date}${raised_for_html}
Time
 
-View Netdata
  -The source of this alarm is line ${src} +send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" " \ +${host} ${status_message}
\ +${alarm} ${info_html}
\ +${chart} (family ${family})
\ +${date}${raised_for_html}
\ +View netdata dashboard \ +(source of alarm ${src}) \ " SENT_HIPCHAT=$?