From 9324438c9572cee6b75078f8a59375e5d9d3977b Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Thu, 28 Oct 1999 15:48:52 +0000 Subject: [PATCH] Initial import --- config/spong.message | 114 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100755 config/spong.message diff --git a/config/spong.message b/config/spong.message new file mode 100755 index 0000000..d448ffb --- /dev/null +++ b/config/spong.message @@ -0,0 +1,114 @@ + +# This flag determines the how the overall rules are matched due a rules scan +# 'FIRST-MATCH' means that the first rule matches is used and the scanning stop +# 'ALL' mean that all matching rules are processed + +$RULES_MATCH = 'FIRST-MATCH'; + +$MESSAGING_RULES = [ + +# Comprehensive rules example showing everything +# { +# hosts => ['perl-re','perl-re','perl-re'], +# services => ['dns','cpu','local'], +# exclude_hosts => ['.*mktu','chr.*'], +# exclude_services => ['disk','dns','misc'], +# times => [ +# { days => ['0','1-3','4-5'], +# times => ['06:30-18:30','21:00-22:00'] }, +# { days => ['5','6','0-2'] }, +# { times => ['13:00-15:23','00:00-23:39'] } +# ] +# contacts => [ stanza, stanza, ... stanza], +# }, +# +# Where a contact stanza can be any of the following: +# 1) 'human' - a string which contains a key from the $HUMANS data +# in the spong.hosts file. Examples: +# 'unix-staff', 'lan-staff', ... +# 2) 'human:func' - a string which contains a key and a message type +# seperated from by a colon (':') Examples: +# 'unix-staff:email', 'edhill:skytel' +# 3) { rcpt=>'string', [delay=>nn], [repeat=>nn] }, +# A hash as written above. +# A) The rcpt field is a string as defined in 1) or 2) above. (REQUIRED) +# B) The delay field is a number. The number of seconds a service has in +# duration before an initial message is sent. (OPTIONAL) +# C) The repeat field is a number. The number of seconds to wait after +# a previous message to send the next message. (OPTIONAL) +# Examples: +# { rcpt=>'unix-staff', delay=>900, repeat=>600 } +# Send notification to 'unix-staff' when something is down for 15 +# minutes and repeat notification every 10 minutes. +# { rcpt=>'edhill:skytel', repeat=>900 } +# Send notification to Ed Hill Skytel pager immediately when +# something goes down, and send out repeat messages every 15 +# minutes. +# { rcpt=>'theboss:pager', delay=7200, repeat=>3600 } +# Let The Boss know if something is down for more then 2 hours +# { rcpt=>'unix-staff:email' } +# This is the same as 2) above. Immediage notifications and no +# repeat messages. +# +# *** Don't forget the comma between each rule hash. +# +# + + # The first two examples will only work in FIRST-MATCH mode + # They rules are useless in ALL rules-matching + + # Leave out vger all together and aci-marketing servers + { + hosts => ['vger','aci-marketing.*'], + services => ['.*'] + }, + + # Don't page for DNS + { + hosts => ['.*'], + services => ['dns'] + }, + + # Infocell servers for CPU page after hours + { + hosts => ['.*mktu'], + services => ['cpu'], + times => [ + { times => [ '22:30-23:59','00:00-06:00'] }, + ], + contacts => ['sjohnson','unix-oncall'] + }, + + # Catch all for infocell cpu + { + hosts => ['.*mktu'], + services => ['cpu'], + }, + + # Tell Kelly and Chris about disk on MB servers + { + hosts => ['.*mb1' , '.*mb2'], + services => ['disk'], + contacts => ['unix-oncall','cbrown'], + }, + + # Infocell notifications during after Production Hours + { + hosts => ['.*mktu'], + services => ['jobs','actbus'], + times => [ + { times => [ '21:00-23:59','00:00-06:00' ] }, + ], + }, + + # Catch all for hosts + { + hosts => ['.*'], + services => ['.*'], + contacts => ['sjohnson','unix-oncall'], + } + +]; + +# This is needed because this is included perl code. +1; -- 2.30.2