Project

General

Profile

Feature #364 » enabledowntime.patch

Patch to check host.enabled value before sending mail - Eric Shamow, 08/23/2010 11:38 PM

View differences:

report_observer.rb.modified 2010-08-23 18:35:37.000000000 -0400
begin
if report.error?
# found a report with errors
# notify via email
HostMailer.deliver_error_state(report) if SETTINGS[:failed_report_email_notification]
# notify via email IF enabled is set to true
if report.host.enabled?
HostMailer.deliver_error_state(report) if SETTINGS[:failed_report_email_notification]
else
report.logger.warn "#{report.host.name} is in downtime."
end
# add here more actions - e.g. snmp alert etc
end
(1-1/3)