diff --git a/handlers/notification/irc.rb b/handlers/notification/irc.rb index 1f5283b3d..d6db8e3a4 100755 --- a/handlers/notification/irc.rb +++ b/handlers/notification/irc.rb @@ -33,10 +33,14 @@ def event_name @event['client']['name'] + '/' + @event['check']['name'] end + def action_to_string + @event['action'].eql?('resolve') ? "\x0300,03RESOLVED\x03" : "\x0301,04ALERT\x03" + end + def handle params = { :uri => settings["irc"]["irc_server"], - :message => "#{event_name}: #{@event['check']['output']}", + :message => "#{action_to_string} #{event_name}: #{@event['check']['output']}", :ssl => settings["irc"]["irc_ssl"], :join => true, }