diff options
author | Jim Cooley <jim.cooley@healthvana.com> | 2016-12-13 18:48:56 -0800 |
---|---|---|
committer | Jim Cooley <jim.cooley@healthvana.com> | 2016-12-13 18:48:56 -0800 |
commit | 39fa64139569c17c65dac96d15e64f5aeadfe1cb (patch) | |
tree | 075d225eeebcbc03b29619770b67394ca4258611 /plugins.d | |
parent | fa694e38a8505c836851c25c848d2d3036da3551 (diff) |
Send all available data in pagerduty.com notifications
Diffstat (limited to 'plugins.d')
-rwxr-xr-x | plugins.d/alarm-notify.sh | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/plugins.d/alarm-notify.sh b/plugins.d/alarm-notify.sh index f1bf4b6f17..907a8227a7 100755 --- a/plugins.d/alarm-notify.sh +++ b/plugins.d/alarm-notify.sh @@ -385,6 +385,7 @@ done [ -z "${PD_SERVICE_KEY}" ] && SEND_PD="NO" # if we need pd-send, check for the pd-send command +# https://www.pagerduty.com/docs/guides/agent-install-guide/ if [ "${SEND_PD}" = "YES" ] then pd_send="$(which pd-send 2>/dev/null || command -v pd-send 2>/dev/null)" @@ -677,9 +678,24 @@ send_pd() { -d "${host} ${chart}.${name} is ${status}" \ -i ${alarm_id} \ -f 'info'="${info}" \ - -f 'value'="${value} ${units}" \ + -f 'value_w_units'="${value} ${units}" \ -f 'when'="${when}" \ - -f 'duration'="${duration}" + -f 'duration'="${duration}" \ + -f 'roles'="${roles}" \ + -f 'host'="${host}" \ + -f 'unique_id'="${unique_id}" \ + -f 'alarm_id'="${alarm_id}" \ + -f 'event_id'="${event_id}" \ + -f 'name'="${name}" \ + -f 'chart'="${chart}" \ + -f 'family'="${family}" \ + -f 'status'="${status}" \ + -f 'old_status'="${old_status}" \ + -f 'value'="${value}" \ + -f 'old_value'="${old_value}" \ + -f 'src'="${src}" \ + -f 'non_clear_duration'="${non_clear_duration}" \ + -f 'units'="${units}" retval=$? if [ ${retval} -eq 0 ] then |