Show
Ignore:
Timestamp:
03/04/08 21:41:07 (6 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1204666867 +0000
git-parent:

[c8fc1f586940896ab596005ec6320c9470b244d0]

git-author:
Mark Harrison <mark@omniti.com> 1204666867 +0000
Message:

Added an optional warning threshold for disk checks along with sample
configuration in the resmon.conf.sample file.

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

Files:

Legend:

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

    re1db995 r0e23bcd  
    101101  my ($line) = grep(/$devorpart\s*/, split(/\n/, $output)); 
    102102  if($line =~ /(\d+)%/) { 
    103     if($1 <= $arg->{'limit'}) { 
    104       return $arg->set_status("OK($1% full)"); 
    105     } 
    106     return $arg->set_status("BAD($1% full)"); 
     103    if($1 > $arg->{'limit'}) { 
     104      return $arg->set_status("BAD($1% full)"); 
     105    } 
     106    if(exists $arg->{'warnat'} && $1 > $arg->{'warnat'}) { 
     107      return $arg->set_status("WARNING($1% full)"); 
     108    } 
     109    return $arg->set_status("OK($1% full)"); 
    107110  } 
    108111  return $arg->set_status("BAD(no data)");