Feature #364 » enabledowntime.patch
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
|