diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/mauveserver.conf | 189 |
1 files changed, 142 insertions, 47 deletions
diff --git a/etc/mauveserver.conf b/etc/mauveserver.conf index bd975ab..e0b74d0 100644 --- a/etc/mauveserver.conf +++ b/etc/mauveserver.conf @@ -1,56 +1,163 @@ # Example mauveserver.conf file, based on Bytemark's configuration. -# Probably still needs a bit of improvement and explanation. -# -# The service which listens for alert messages +# +# This is the main configuration clause for the server instance. # server { - # - # persistent data store # - database "sqlite3:///var/lib/mauvealert/alerts.db" + # This is where our database lives. Example strings are as follows: + # + # postgres://username:password@host/database + # sqlite3:///var/lib/mauvealert/alerts.db + # + database "sqlite3::memory:" + + # + # This is our hostname. It gets used when URLs are generated, and in the heartbeat alert. + # + hostname `hostname`.chomp + # + # This is the UDP listener. + # listener { - ip "0.0.0.0" + # + # This is the IP and port for that the UDP packets come in on. The IP can + # be IPv4 or 6. If "::" is specified, then packets will be received over + # both IPv4 and 6. The default port is 32741. + # + ip "::" port 32741 + + # + # This is how long the UDP server will sleep between looking for packets. + # + poll_every 1 + } + + + # + # This is the processing thread, which recieves packets, and updates the + # database as needed. + # + processor { + # + # This is the length of time the processor will sleep between checking for + # new packets from the UDP listener. + # + poll_every 1 + + # + # In order to make sure the same transmission isn't received more then + # once, a cache of transmission IDs is kept. This expire time below + # determines the interval over which this cache is expired. + # + transmission_cache_expire_time 300 } - - # default is probably more than enough! - # transmission_id_expire_time 600 - # few options for web interface, just the TCP port number + # + # The web interface + # web_interface { - ip "127.0.0.1" + # + # The listening IP and port. Can be IPv4 or IPv6. Bear in mind that for + # ports < 1024, mauveserver will need to be run as root, or have special + # dispensation. + # + ip "::" port 1288 - document_root "/srv/mauvealert" + + # + # This is where the template files live. + # + # document_root "/srv/mauvealert" + + # + # This is used in the cookie, to prevent session-stealing. + # + session_secret "PLEASE CHANGE ME" + } + + + # + # This is where the mauve server sends its own heartbeat. Useful for + # watching the watcher. + # + heartbeat { + # + # If no destination is specified, then the contents of + # /etc/mauvealert/mauvesend.destination are used. + # + destination "localhost" + # + # This is how long to wait before the alert is raised + # + raise_after 600 + # + # These two fields have sensible defaults set, but more informative + # messages can be set here. + # + summary "Mauve alert server is down" + detail "The Mauve alert server has failed to send a heartbeat" } + } +# +# The logger uses log4r +# logger { + # + # This is the default formatting string. It is a PatternFormatter, which is + # described at + # http://log4r.rubyforge.org/rdoc/Log4r/rdoc/patternformatter.html + # default_format "%d [ %6.6l ] [ %12.12c ] %m" - outputter("file") { - filename "/var/log/mauvealert/mauvealert.log" - trunc false + # + # This is the default logging level. It can be one of + # + # Log4r::DEBUG + # Log4r::INFO + # Log4r::NOTICE + # Log4r::WARN + # Log4r::ERROR + # Log4r::FATAL + # + default_level Log4r::INFO + + # + # An outputter can be any one of those listed at + # http://log4r.rubyforge.org/rdoc/Log4r/rdoc/outputter.html. The name must + # correspond to the class name. The options in each outputter correspond to + # the "hash" arguments for that particular outputter class. + # + # Additionally each outputter can have a level, and format assoicated. + # + outputter("stdout") { level Log4r::INFO } -# outputter("stdout") { -# level Log4r::DEBUG -# } + outputter("file") { + filename "/tmp/mauveserver.log" + trunc true + level Log4r::DEBUG + } # outputter("email") { -# server "localhost" +# server "smtp.example.com" # subject "Mauve logger output" -# from "mauvealert@localhost" -# to "boring@localhost" -# domain "localhost" +# from "#{ENV['USER']}@#{Socket.gethostname}" +# to "awooga@example.com" # level Log4r::WARN # } } +# +# Email messaging. +# notification_method("email") { # # email address to send from @@ -62,25 +169,18 @@ notification_method("email") { # server "localhost" - # + # # add this to the subject of any emails we send # subject_prefix "[mauvealert]" } -# How to log into a jabber server -# -# notification_method("xmpp") { -# jid "mauvealert@chat.example.com/boo" -# password "x" -# } - # How to notify by SMS - we use aql.com, a provider for clockworksms.com # is also provided. For another provider, you'll need to write a module. # # notification_method("sms") { # provider "AQL" -# +# # username "x" # password "x" # from "01234567890" @@ -91,7 +191,7 @@ notification_method("email") { # # notification_method("sms") { # provider "Clockwork" -# +# # apikey "sssseeeeeeccccccccrrrrreeeeeettttsssssss" # from "01234567890" # @@ -102,7 +202,7 @@ notification_method("email") { # Simple default notification preference for root at this machine, at all # alert levels. You probably want more people, see below for a more complete # example. -# +# person("root") { all { email("root@localhost") } } @@ -113,18 +213,13 @@ person("root") { # # sms "07111222333" # email "johnny@example.com" -# xmpp "johnny@example.com.jabber.org" # # # Johnny wants waking up 24/7 if anything urgent happens # urgent { sms } # -# # XMPP, or Email him for anything that's not urgent -# normal { xmpp or email } -# -# # Anything else can just be a jabber message, which he might miss. -# # Email instead if he's unavailable/offline - but give it a try if -# # we don't know his status. -# low { xmpp("johnny@example.com.jabber.org", :if_presence => [:available, unknown]) || email } +# # Email him for anything that's not urgent +# normal { email } +# low { email } # # # SMS messages are expensive, if we're sending more than 5 per minute, # # tell the user we're going to stop until it slows down. @@ -145,22 +240,22 @@ person("root") { # suppress_notifications_after 3 => 1.hour # } -# Here is a group of alerts generated by the core routers. -# +# Here is a group of alerts generated by the core routers. +# # alert_group { # level URGENT # includes { source == "core-router" } # # # Johnny should get up and fix these errors very quickly, we will # # bother him every 15 minutes until he does. -# # +# # # notify("johnny") { every 15.minutes } # # # Archie only wants to know about these alerts if they have gone # # unacknowledged for a whole hour - Johnny must be slacking! Even # # then he only needs to know during the working day. # # -# notify("archie") { +# notify("archie") { # every 6.hours # during { unacknowledged(1.hour); hours_in_day(9..17) } # } @@ -168,7 +263,7 @@ person("root") { # # Default notification - tell root about all alerts every hour -# +# alert_group { level NORMAL notify("root") { every 1.hour } |