[Nagiosplug-help] Bug with "-C" option in check_disk?

Marty Combs nagios-devel at martycombs.com
Mon Jan 30 13:30:02 CET 2006

The nagios documentation indicates that the warn/crit levels in check_disk 
can be reset within the same check_disk commandusing '-C', but mixing 
percent values and absolute units does not work unless the check runs from 
largest partition to smallest partition.

For example, running ./check_disk --help provides the example:

  check_disk -w 10% -c 5% -p /tmp -p /var -C -w 100000 -c 50000 -p /
    Checks /tmp and /var at 10%,5% and / at 100MB, 50MB

This check will not work if /tmp or /var are smaller than 100MB.  On a 
real system here are some partitions I have:

/dev/sda5             513M  234M  280M  46% /
/dev/sda8              15G 1022M   14G   7% /var

If I run the check below check_disk returns a critical error.

./check_disk -u MB -e -w 20% -c 10% -p / -C -w 50 -C -w 800 -c 500 -p /var

DISK CRITICAL - free space: / 280 MB (55%);| /=234MB;410;13;0;513 

But if I swap them the check completes with no error.

./check_disk -u MB -e -w 800 -c 500 -p /var -C -w 20% -c 10% -p /

DISK OK - free space:| /=234MB;410;461;0;513 

More information about the Help mailing list