aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/alert_group.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve/alert_group.rb')
-rw-r--r--lib/mauve/alert_group.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/mauve/alert_group.rb b/lib/mauve/alert_group.rb
index 75f97fd..bfdb3cf 100644
--- a/lib/mauve/alert_group.rb
+++ b/lib/mauve/alert_group.rb
@@ -40,17 +40,15 @@ module Mauve
# Make sure we've got a matching group
#
if groups.empty?
- logger.warn "no groups found for #{alert}"
+ logger.warn "no groups found for #{alert}!"
next
end
#
- # Notify just the group that thinks this alert is the most urgent.
+ # Notify just the first group
#
- logger.warn "Found #{groups.length} matching groups for #{alert}" if groups.length > 1
-
this_group = groups.first
- logger.info("notifying group #{this_group} of #{alert} (matching #{this_group.level})")
+ logger.info("notifying group #{this_group} of #{alert}")
this_group.notify(alert)
end
end
@@ -103,7 +101,7 @@ module Mauve
def matches_alert?(alert)
unless alert.is_a?(Alert)
- logger.warn "Got given a #{alert.class} instead of an Alert!"
+ logger.error "Got given a #{alert.class} instead of an Alert!"
logger.debug caller.join("\n")
return false
end
@@ -126,7 +124,7 @@ module Mauve
# If there are no notifications defined.
#
if notifications.nil?
- logger.warn("No notifications found for #{alert}")
+ logger.warn("No notifications found for #{self.inspect}")
return
end