diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-13 16:02:50 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-13 16:02:50 +0100 |
commit | e140af144e987ff7f6d767f2dc48b9cf685803fd (patch) | |
tree | 4a01971890865b4b3ca837d563bc673cbb787de8 /lib/mauve/alert_group.rb | |
parent | d28af4ec946c6aa4b645b73cef47d7e0c680bc0d (diff) |
Big commit
* Added manpages for all binaries
* Added log-reopening for mauvealert-server, and logrotate snippet
* mauveserver now adds a user on install, and runs as that user
* Big logging tidy-up
* Alert subjects are only overwritten by the source, when the subject in the databse is empty
* Removed various attr_writer methods that were being redifined
* Added a notes box to the acknowledge form, but this doesn't work yet
Diffstat (limited to 'lib/mauve/alert_group.rb')
-rw-r--r-- | lib/mauve/alert_group.rb | 12 |
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 |