Module: RRDNotifier::DefaultNotificationHandler
- Defined in:
- lib/rrd-grapher/notifier/default_user_handler.rb
Class Method Summary collapse
-
.alarm_started(alarm) ⇒ Object
A new alarm was triggered.
-
.alarm_stopped(alarm) ⇒ Object
An alarm was stopped.
- .dispatch_notification(notification) ⇒ Object
Class Method Details
.alarm_started(alarm) ⇒ Object
A new alarm was triggered
23 24 25 |
# File 'lib/rrd-grapher/notifier/default_user_handler.rb', line 23 def self.alarm_started(alarm) puts "an alarm was started: #{alarm.inspect}" end |
.alarm_stopped(alarm) ⇒ Object
An alarm was stopped
32 33 34 |
# File 'lib/rrd-grapher/notifier/default_user_handler.rb', line 32 def self.alarm_stopped(alarm) puts "an alarm was stopped: #{alarm.inspect}" end |
.dispatch_notification(notification) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rrd-grapher/notifier/default_user_handler.rb', line 4 def self.dispatch_notification(notification) puts "[#{ev.time.strftime('%H:%m:%S')} - #{ev.host}] #{ev.severity} " puts %{ Host: {ev.host} Plugin: #{ev.plugin} Type: #{ev.type} TypeInstance: #{ev.type_instance} Severity: #{ev.severity} Current Value: #{ev.value} Warning thresholds: #{ev.warn_min} - #{ev.warn_max} Failure thresholds: #{ev.failure_min} - #{ev.failure_max} } end |