diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-02-17 02:12:07 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-02-17 02:12:07 +0200 |
commit | 9aec1b88d3d6a25fa68ab63f03c024cb54911017 (patch) | |
tree | 90e260145a3cf0643727dda90b038b765ce55cf1 /plugins.d | |
parent | 932e4df6549dd18e06d45e955d0053bb1f8aca25 (diff) |
properly escape quotes in hipchat notifications
Diffstat (limited to 'plugins.d')
-rwxr-xr-x | plugins.d/alarm-notify.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins.d/alarm-notify.sh b/plugins.d/alarm-notify.sh index 2bfe89e6ea..3a26ea7488 100755 --- a/plugins.d/alarm-notify.sh +++ b/plugins.d/alarm-notify.sh @@ -1284,9 +1284,17 @@ SENT_PD=$? # ----------------------------------------------------------------------------- # send hipchat message -send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" "<b>${alarm}</b> ${info_html}<br/> <br/><small><b>${chart}</b><br/>Chart<br/> </small><br/><small><b>${family}</b><br/>Family<br/> </small><br/><small><b>${severity}</b><br/>Severity<br/> </small><br/><small><b>${date}${raised_for_html}</b><br/>Time<br/> </small><br/><a href=\"${goto_url}\">View Netdata</a><br/> <br/><small><small>The source of this alarm is line ${src}</small></small>" -SENT_HIPCHAT=$? +send_hipchat "${HIPCHAT_AUTH_TOKEN}" "${to_hipchat}" "\ +<b>${alarm}</b> ${info_html}<br/> \ +<small><b>${chart}</b><br/>Chart<br/> </small>\ +<small><b>${family}</b><br/>Family<br/> </small>\ +<small><b>${severity}</b><br/>Severity<br/> </small>\ +<small><b>${date}${raised_for_html}</b><br/>Time<br/> </small>\ +<a href=\\\"${goto_url}\\\">View Netdata</a><br/> \ +<small><small>The source of this alarm is line ${src}</small></small>\ +" +SENT_HIPCHAT=$? # ----------------------------------------------------------------------------- # send the email |