Changeset cab0e0f3daabfa75635eddb0146bda858df7e2ad

Show
Ignore:
Timestamp:
05/24/08 03:02:50 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1211598170 +0000
git-parent:

[78cf7c4b0e67e42f6a8a05ff4c4bb0dbd09cdb0e]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1211598170 +0000
Message:

fix them up to be number-consistent

git-svn-id: https://labs.omniti.com/resmon/trunk@114 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Resmon/Module/DHCPLEASES.pm

    r748aca8 rcab0e0f  
    4747    return($arg->set_status("OK($actives leases)")); 
    4848  }elsif ($actives < $crit) { 
    49     return($arg->set_status("WARN($actives leases > $warn)")); 
     49    return($arg->set_status("WARN($actives leases)")); 
    5050  }else { 
    51     return($arg->set_status("BAD($actives leases > $crit!)")); 
     51    return($arg->set_status("BAD($actives leases)")); 
    5252  } 
    5353}; 
  • lib/Resmon/Module/DISK.pm

    r748aca8 rcab0e0f  
    2222    return $arg->set_status("OK($1% full)"); 
    2323  } 
    24   return $arg->set_status("BAD(no data)"); 
     24  return $arg->set_status("BAD(0 -- no data)"); 
    2525} 
    26261; 
  • lib/Resmon/Module/FILEAGE.pm

    r748aca8 rcab0e0f  
    1010  my @statinfo = stat($file); 
    1111  my $age = time() - $statinfo[9]; 
    12   return $arg->set_status("BAD(too old $age seconds)") 
     12  return $arg->set_status("BAD($age seconds, too old)") 
    1313        if($arg->{maximum} && ($age > $arg->{maximum})); 
    14   return $arg->set_status("BAD(too new $age seconds)") 
     14  return $arg->set_status("BAD($age seconds, too new)") 
    1515        if($arg->{minimum} && ($age > $arg->{minimum})); 
    16   return $arg->set_status("OK($age)"); 
     16  return $arg->set_status("OK($age seconds)"); 
    1717} 
    18181; 
  • lib/Resmon/Module/FILESIZE.pm

    r748aca8 rcab0e0f  
    1212  my $minsize = $arg->{minimum}; 
    1313  my $maxsize = $arg->{maximum}; 
    14   return $arg->set_status("BAD(too big, $size > $maxsize)") 
     14  return $arg->set_status("BAD($size, too big)") 
    1515        if($maxsize && ($size > $maxsize)); 
    16   return $arg->set_status("BAD(too small, $size < $minsize)") 
     16  return $arg->set_status("BAD($size, too small)") 
    1717        if($minsize && ($size > $minsize)); 
    1818  return $arg->set_status("OK($size)"); 
  • lib/Resmon/Module/OLDFILES.pm

    r78cf7c4 rcab0e0f  
    3333        my ($line) = grep(/$dir\s*/, split(/\n/, $output)); 
    3434        if($line !~ /(\d+)%/) { 
    35             return "BAD", "dir not mounted"; 
     35            return "BAD", "0 dir not mounted"; 
    3636        } 
    3737    } 
     
    4141    chomp($output); 
    4242    if ($output <= $filecount) { 
    43         return "OK", "$output files over $minutes minutes"; 
     43        return "OK", "$output files"; 
    4444    } else { 
    45         return "BAD", "$output files over $minutes minutes"; 
     45        return "BAD", "$output files"; 
    4646    } 
    4747} 
  • lib/Resmon/Module/QUEUESIZE.pm

    rea47429 rcab0e0f  
    3232        if( $total =~ /\s*$queue Queue:\s*(\d+).*/ ) { 
    3333            if( $1 > $threshold ) { 
    34                 return "BAD", "$1 Messages $queue"; 
     34                return "BAD", "$1 messages"; 
    3535            } else { 
    36                 return "OK", "$1 Messages $queue"; 
     36                return "OK", "$1 messages"; 
    3737            } 
    3838        } else { 
    39             return "OK", "no messages for domain"; 
     39            return "OK", "0"; 
    4040        } 
    4141    } else { 
  • lib/Resmon/Module/REMOTEFILESIZE.pm

    r748aca8 rcab0e0f  
    1515  my $minsize = $arg->{minimum}; 
    1616  my $maxsize = $arg->{maximum}; 
    17   return $arg->set_status("BAD(too big, $size > $maxsize)") 
     17  return $arg->set_status("BAD($size, too big)") 
    1818        if($maxsize && ($size > $maxsize)); 
    19   return $arg->set_status("BAD(too small, $size < $minsize)") 
     19  return $arg->set_status("BAD($size, too small)") 
    2020        if($minsize && ($size > $minsize)); 
    2121  return $arg->set_status("OK($size)"); 
  • lib/Resmon/Module/SIMPLESVN.pm

    r6f9fa4a rcab0e0f  
    2727      $revision = $1; 
    2828    } 
    29     return $status, "rev:$revision"; 
     29    return $status, "$revision"; 
    3030} 
    3131 
  • lib/Resmon/Module/WALCHECK.pm

    r748aca8 rcab0e0f  
    5555  my $lnow = timegm(@nn); 
    5656 
    57   my $diff =  $proc - $lnow
    58   my @tsplit = splittime($diff,60,60,24,7); 
     57  my $diff =  $lnow - $proc
     58  my @tsplit = splittime((0 - $diff),60,60,24,7); 
    5959 
    60   if ($diff < -3600) 
     60  if ($diff > 3600) 
    6161  { 
    62         return $arg->set_status( "BAD(pitr replay is $tsplit[2] hours, $tsplit[1] minutes behind)"); 
     62        return $arg->set_status( "BAD($diff seconds behind)"); 
    6363  } else { 
    64         return $arg->set_status( "OK(pitr replay is $tsplit[2] hours, $tsplit[1] minutes behind)"); 
     64        return $arg->set_status( "OK($diff seconds behind)"); 
    6565  } 
    6666} 
  • lib/Resmon/Module/ZPOOLFREE.pm

    r07bfd3b rcab0e0f  
    3131    return "OK", "$1% full"; 
    3232  } 
    33   return "BAD", "no data"; 
     33  return "BAD", "0 no data"; 
    3434} 
    3535