From 9931f46f24003b233e5dbe5a09851724f7f0b11c Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Wed, 20 Dec 2000 22:00:45 +0000 Subject: [PATCH] added per service downtime --- src/lib/Spong/Service.pm | 3 ++- src/spong-message.pl | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/Spong/Service.pm b/src/lib/Spong/Service.pm index 91cf13c..dc35332 100755 --- a/src/lib/Spong/Service.pm +++ b/src/lib/Spong/Service.pm @@ -82,7 +82,8 @@ sub color { my $var = 'color'; # If there is a problem reported, and we are in this machine's down time # then don't report it, instead mark it as blue. - foreach( @{$main::HOSTS{$name}->{'down'}} ) { + foreach( @{$main::HOSTS{$name}->{'down'}}, + @{$main::HOSTS{$name}->{'down:' . $_[0]->name() }} ) { my( $day, $shour, $smin, $ehour, $emin ) = ( /^(.):(\d+):(\d+)-(\d+):(\d+)$/ ); my( $nmin, $nhour, $nday ) = (localtime(time()))[1,2,6]; diff --git a/src/spong-message.pl b/src/spong-message.pl index 1740631..d37e844 100755 --- a/src/spong-message.pl +++ b/src/spong-message.pl @@ -12,7 +12,7 @@ # (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.19 2000/12/19 22:18:10 sljohnson Exp $ +# $Id: spong-message.pl,v 1.20 2000/12/20 22:00:45 sljohnson Exp $ use lib "@@LIBDIR@@"; @@ -158,7 +158,8 @@ if (defined $acks) { # If there is a problem reported, and we are in this machine's down time # then don't do anything about it. -foreach( @{$main::HOSTS{$host}->{'down'}} ) { +foreach( @{$main::HOSTS{$host}->{'down'}}, + @{$main::HOSTS{$host}->{"down:$service"}} ) { my( $day, $shour, $smin, $ehour, $emin ) = ( /^(.):(\d+):(\d+)-(\d+):(\d+)$/ ); my( $nday, $nhour, $nmin ) = (localtime())[6,2,1]; -- 2.30.2