aboutsummaryrefslogtreecommitdiff
path: root/example.conf
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-07-20 16:15:03 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-07-20 16:15:03 +0100
commit645c47d975e3c34a092acddf4a5f9420010755bc (patch)
tree6c667f44b01425efe6e7e4e10813bfe0cc082632 /example.conf
parent53f89ba450850990057883a92f89ed994563e4ab (diff)
* Added heartbeat to remote mauve
* Added URLs to messages * Added example configuration file * Added various docs * XMPP messages now XHTML and TXT * Handling of MUC reconnection a bit better.
Diffstat (limited to 'example.conf')
-rw-r--r--example.conf208
1 files changed, 208 insertions, 0 deletions
diff --git a/example.conf b/example.conf
new file mode 100644
index 0000000..c7e86e4
--- /dev/null
+++ b/example.conf
@@ -0,0 +1,208 @@
+#
+# This is the main configuration clause for the server instance.
+#
+server {
+ #
+ # This is where our database lives. SQLite is the default.
+ #
+ database "sqlite3://./alerts.db"
+
+ #
+ # This is our hostname. It gets used when URLs are generated, and in the heartbeat alert.
+ #
+ hostname "mauve.example.com"
+
+ #
+ # This is the UDP listener.
+ #
+ listener {
+ #
+ # 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.
+ #
+ sleep_interval 1
+ }
+
+
+ #
+ # This is the processing thread, which reveives 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.
+ #
+ sleep_interval 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
+ }
+
+ #
+ # The web interface
+ #
+ web_interface {
+ #
+ # 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
+
+ #
+ # This is where the template files live.
+ #
+ document_root "/usr/share/mauvealert/"
+
+ #
+ # This is used in the cookie, to prevent session-stealing.
+ #
+ session_secret "PLEASE CHANGE ME"
+ }
+
+ #
+ # The timer checks for alerts set to be raised/cleared in the future, or
+ # alert reminders, and triggers notifications thereof.
+ #
+ timer {
+ #
+ # This determines how often the timer thread checks for new reminders/notifications
+ #
+ sleep_interval 1
+ }
+
+
+ #
+ # 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_at 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"
+
+ #
+ # 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::WARN
+ }
+
+ outputter("file") {
+ filename "/tmp/mauveserver.log"
+ trunc true
+ level Log4r::DEBUG
+ }
+
+ outputter("email") {
+ server "smtp.example.com"
+ subject "Mauve logger output"
+ from "#{ENV['USER']}@#{Socket.gethostname}"
+ to "awooga@example.com"
+ level Log4r::WARN
+ }
+
+}
+
+#
+# XMPP instant messaging. This are the credentials to log into the XMPP
+# account that mauve will use.
+#
+notification_method ("xmpp") {
+ jid "mauve@chat.example.com/mauve"
+ password "mauvespassword"
+}
+
+#
+# Email messaging.
+#
+notification_method ("email") {
+ server "localhost"
+ from "mauve@desk1.tur.bytemark.co.uk"
+ subject_prefix "mauve-test"
+}
+
+person("office_chat") {
+ xmpp "muc:mauve-test@conference.chat.bytemark.co.uk/MauveAlert"
+ all { xmpp }
+# suppress_notifications_after(310 => 1.minute)
+}
+
+person ("pcherry") {
+ password '82da4c33e3a5ae9e51def466745e2c8965fa1476'
+ all { true }
+}
+
+people_list ("arse") {
+ list [ "office_chat" ]
+}
+
+#
+# Default notification - tell root about all alerts every hour
+#
+alert_group("default") {
+ level URGENT
+
+ notify("arse") {
+ every 2.minutes
+ }
+}
+
+