@cryptotaxi247 / netdata-1 / commits / eef866e72

Fix to #4968, custom recipients were not working properly (#4978)

##### Summary Fixes #4968 The custom recipient variable substitution wasn't working properly ##### Component Name health notifications ##### Additional Information

Chris Akritidis committed Dec 13, 2018 at 16:29 UTC eef866e721486ebb21b7650f6c73b9ffa16f8383
1 file changed +2 -3
health/notifications/alarm-notify.sh.in
+2 -3
@@ -592,11 +592,10 @@ for method_name in ${method_names} ; do
592 # don't send a notification for this role
593 [ "${x}" = "silent" -o "${x}" = "disabled" ] && continue
594
595 - role_recipients_var="role_recipients_${method_name}"
596 - role_recipients=${!role_recipients_var}
595 + role_recipients="role_recipients_${method_name}[$x]"
596 default_recipient_var="DEFAULT_RECIPIENT_${method_name^^}"
597
599 - a="${role_recipients[${x}]}"
598 + a="${!role_recipients}"
599 [ -z "${a}" ] && a="${!default_recipient_var}"
600 for r in ${a//,/ } ; do
601 [ "${r}" != "disabled" ] && filter_recipient_by_criticality ${method_name} "${r}" && arr_var[${r/|*/}]="1"