# (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.39 2003/05/11 02:57:42 sljohnson Exp $
+# $Id: spong-message.pl,v 1.40 2003/07/26 20:36:46 sljohnson Exp $
use lib "@@LIBDIR@@";
}
}
+ #
+ # Match on colors or status
+ #
+
+ if ( ! defined $rule->{'colors'} and
+ ! defined $rule->{'status'} ) {
+
+ debug("Color/Status default match for $color on rule $c $rule->{'name'}");
+ } else {a
+ $m = 0;
+
+ # Scan though each color in the rule
+ foreach my $clr ( @{$rule->{'colors'}},
+ @{$rule->{'status'}} ) {
+ if ($color eq $clr) {
+ $m = 1; last;
+ }
+ }
+
+ if ( ! $m ) {
+ debug("No color/status match for $color on rule $c $rule->{'name'}"); next RULE;
+ } else {
+ debug("Color match for $color on rule $c $rule->{'name'}");
+ }
+ }
+
#
# Match on hosts and host_groups
#
- # If no matech elements defined, match automatically
+ # If no match elements defined, match automatically
if ( ! defined $rule->{'hosts'} &&
! defined $rule->{'host_groups'} ) {
&debug("Host match for $host on rule $c $rule->{'name'}");