]> git.etc.gen.nz Git - spong.git/commitdiff
fixed bug in checking code where $color var was not being set properly
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 6 Jun 2000 02:38:22 +0000 (02:38 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 6 Jun 2000 02:38:22 +0000 (02:38 +0000)
src/spong-network.pl

index 323b12043885c11261870a56e1415d667ecf7c72..23c17320e0b43919cb70276a9b37864d89a5496a 100755 (executable)
@@ -190,10 +190,10 @@ sub do_check {
    # If current status is not red, reset the critical level counter.
    if ($status eq 'red') {
       $crit_count += 1;
+      $color = 'red'; 
       if ($crit_count < $CRIT_WARN_LEVEL) { 
          $color = 'yellow' if $laststatus eq 'green'; 
       } else {
-         $color = 'red'; 
          $HOSTS{$host}->{'service'}->{$service}->{'laststatus'} = 'red';
       }
       $summary = "($crit_count/$CRIT_WARN_LEVEL) " . $summary;