{ hosts => [ 'gard.cs.school.edu' ],
contacts => [ 'unix-staff'],
+ exclude_colors => ['green','yellow'],
},
{ hosts => ['www.school.edu'],
A list of one or more regular expressions that are matched against the host
name of the status event. If at least one of the expressions matched the service
-name, the term is considered an exclusion match..
+name, the term is considered an exclusion match.
=item * exclude_host_groups
A list of one or more host group names from the F<spong.groups> (see L<spong.groups>). If the host name of the status event is a member of one of the host
groups, the term is considered an exclusion match.
+=item * exclude_colors or exclude_status
+
+A list of one of more status colors ('red', 'yellow', or 'green'). If the
+status color is the event matches one of the colors in the list, the term is
+considered an exclusion match.
+
=back
And each rule must have the following attributes:
},
# Let Dwayne in Engineering know when a system does down and dns problems
- # except for the test box
+ # except for the test box and only send him down messages
{
hosts => ['.*'],
services => ['ping','ftp','smtp','dns'],
exclude_host => ['tunixt'],
+ exclude_colors => ['green','yellow']
contacts => [ 'dstucker' ],
},
# (2) Added rules based paging (Stephen Johnson Nov 14, 1998)
# (3) Added checks against Acks and downtime (Stephen Johnson Mar 17, 1999)
#
-# $Id: spong-message.pl,v 1.20 2000/12/20 22:00:45 sljohnson Exp $
+# $Id: spong-message.pl,v 1.21 2000/12/21 00:12:50 sljohnson Exp $
use lib "@@LIBDIR@@";
}
}
+ if( defined $rule->{'exclude_colors'} or
+ defined $rule->{'exclude_status'} ) {
+ foreach my $clr ( @{$rule->{'exclude_colors'}},
+ @{$rule->{'exclude_status'}} ) {
+ if( $color eq $clr ) {
+ debug("Match on exclude color $clr on rule $c," .
+ " going to next rule");
+ next RULE;
+ }
+ }
+ }
+
# Match on hosts and host_groups
if ( ! defined $rule->{'hosts'} &&
! defined $rule->{'host_groups'} ) {