aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-02 16:54:13 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-02 16:54:13 +0100
commit048f420510370b6276db27da5c4f55620badf6b4 (patch)
treef47ba83136adc904293ba7c8151d93595e8acea9 /etc
parent44716daaf1eb940b33b0459941f29881ae09aa3a (diff)
More interface tweaks.
--HG-- rename : mauveserver.conf => etc/mauveserver.conf rename : test/ts_mauve.rb => test/test_mauve.rb
Diffstat (limited to 'etc')
-rw-r--r--etc/mauveserver.conf159
1 files changed, 159 insertions, 0 deletions
diff --git a/etc/mauveserver.conf b/etc/mauveserver.conf
new file mode 100644
index 0000000..4baec0a
--- /dev/null
+++ b/etc/mauveserver.conf
@@ -0,0 +1,159 @@
+# 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
+#
+server {
+ #
+ # persistent data store, only sqlite3 supported at the moment
+ #
+ database "sqlite3:///var/lib/mauvealert/alerts.db"
+
+ listener {
+ ip "0.0.0.0"
+ port 32741
+ }
+
+ # default is probably more than enough!
+ # transmission_id_expire_time 600
+
+ # few options for web interface, just the TCP port number
+ web_interface {
+ ip "0.0.0.0"
+ port 1288
+ document_root "/usr/share/mauvealert"
+ }
+}
+
+logger {
+
+ default_format "%d [ %6.6l ] [ %12.12c ] %m"
+
+ outputter("file") {
+ filename "/var/log/mauvealert/mauvealert.log"
+ trunc false
+ level Log4r::INFO
+ }
+
+# outputter("stdout") {
+# level Log4r::DEBUG
+# }
+
+# outputter("email") {
+# server "localhost"
+# subject "Mauve logger output"
+# from "mauvealert@localhost"
+# to "boring@localhost"
+# domain "localhost"
+# level Log4r::WARN
+# }
+
+}
+
+notification_method("email") {
+ #
+ # email address to send from
+ #
+ from "mauvealert@" + `hostname`.chomp
+
+ #
+ # outbound smtp host
+ #
+ 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, you'll need to write a module
+# to use any other provider.
+#
+# notification_method("sms") {
+# provider "AQL"
+#
+# username "x"
+# password "x"
+# from "01234567890"
+#
+# # Maximum number of SMS messages to concatenate for one notification
+# max_messages_per_alert 3
+# }
+
+# 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") }
+}
+
+# Johnny is the go-to guy for everything on this network, poor Johnny!
+#
+# person("johnny") {
+#
+# # Johnny wants waking up 24/7 if anything urgent happens
+# urgent { sms("07111222333") }
+#
+# # Email him for anything that's not urgent
+# normal { email("johnny@example.com") }
+#
+# # 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("johnny@example.com") }
+#
+# # 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.
+# suppress_notifications_after 5 => 1.minute
+# # In general, this is too many notifications for Johnny
+# suppress_notifications_after 60 => 1.hour
+# }
+
+# Archie is Johnny's boss
+#
+# person("archie") {
+# all { email("archie@example.com") }
+#
+# # Don't spam Archie, if more than 3 messages per hour come in.
+# suppress_notifications_after 3 => 1.hour
+# }
+
+# 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") {
+# every 6.hours
+# during { unacknowledged(1.hour); hours_in_day(9..17) }
+# }
+# }
+
+#
+# Default notification - tell root about all alerts every hour
+#
+alert_group {
+ level NORMAL
+ notify("root") { every 1.hour }
+}
+