diff options
author | Piotr Roszatycki <piotr.roszatycki@gmail.com> | 2018-12-20 15:05:17 +0100 |
---|---|---|
committer | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2018-12-20 15:05:17 +0100 |
commit | 7bf4c597765af12618d24b9ede67190547c3e18f (patch) | |
tree | 38e3ab14b4e739813fe7ab370482ba621e4678b5 /health | |
parent | 83e4b721fe11d3dfb938730e54a24c5edf385e6a (diff) |
New option clear_alarm_always (#5050)
##### Summary
Netdata after restart might clear the status of previous alarm to UNINITIALIZED. In that case in Alerta we can have a status not cleared correctly. It is not a problem to send it once again because Alerta does deduplication of alerts by itself.
##### Component Name
health/notifications
##### Additional Information
It is just additional variable in health_alarm_notify.conf
Diffstat (limited to 'health')
-rwxr-xr-x | health/notifications/alarm-notify.sh.in | 2 | ||||
-rwxr-xr-x | health/notifications/health_alarm_notify.conf | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in index 9bc4bd0282..76e29e560f 100755 --- a/health/notifications/alarm-notify.sh.in +++ b/health/notifications/alarm-notify.sh.in @@ -243,7 +243,7 @@ then fi # don't do anything if this is CLEAR, but it was not WARNING or CRITICAL -if [ "${old_status}" != "WARNING" -a "${old_status}" != "CRITICAL" -a "${status}" = "CLEAR" ] +if [ "${clear_alarm_always}" != "YES" -a "${old_status}" != "WARNING" -a "${old_status}" != "CRITICAL" -a "${status}" = "CLEAR" ] then info "not sending notification for ${status} of '${host}.${chart}.${name}' (last status was ${old_status})" exit 1 diff --git a/health/notifications/health_alarm_notify.conf b/health/notifications/health_alarm_notify.conf index 68d868ff2f..2aaf2f5ee4 100755 --- a/health/notifications/health_alarm_notify.conf +++ b/health/notifications/health_alarm_notify.conf @@ -127,6 +127,14 @@ aws="" #logger_options="" #------------------------------------------------------------------------------ +# extra options + +# By default don't do anything if this is CLEAR, but it was not WARNING or CRITICAL. +# You can send it always if your system makes deduplication for alarms. +#clear_alarm_always='YES' + +# +#------------------------------------------------------------------------------ # NOTE ABOUT RECIPIENTS # # When you define recipients (all types): |