Page 1 of 1

check_disk reports "CRITICAL" but there is space left!?

Posted: Mon Apr 28, 2014 6:51 am
by maurizio-tcc
You are not alone in the dark, I have the same problem on a Mac Server.

# sudo -u nagios /usr/local/nagios/libexec/check_disk -w 10% -c 3% -W 10% -K 3% -p /Volumes/vol1 -vvv
Thresholds(pct) for /Volumes/vol1 warn: 10.000000 crit 3.000000
calling stat on /Volumes/vol1
For /Volumes/vol1, total=1516878542, available=0, available_to_root=4028949056, used=18446744071197481102, fsp.fsu_files=1516878540, fsp.fsu_ffree=4028949056
For /Volumes/vol1, used_pct=100 free_pct=0 used_units=1.75922e+13 free_units=0 total_units=5.92531e+06 used_inodes_pct=1.2161e+12 free_inodes_pct=-1.2161e+12 fsp.fsu_blocksize=4096 mult=1048576
Freespace_units result=0
Freespace% result=2
Usedspace_units result=0
Usedspace_percent result=0
Usedinodes_percent result=0
Freeinodes_percent result=0
DISK CRITICAL - free space: /Volumes/vol1 0 MB (0% inode=-1216098954745%);| /Volumes/vol1=17592176231640MB;5332775;5747546;0;5925306

When the df output is:

Code: Select all

# df /Volumes/vol1
Filesystem                                                      512-blocks        Used   Available Capacity    iused      ifree %iused  Mounted on
//path/vol1 46494766704 14263178720 32231587984    31% 1782897338 4028948498   31%   /Volumes/vol1

Re: check_disk reports "CRITICAL" but there is space left!?

Posted: Mon Apr 28, 2014 11:25 am
by abrist
Looks like you are overflowing a counter/integer. Do you still have the same issues it you increase the unit of measurement:

Code: Select all

 -u, --units=STRING
    Choose bytes, kB, MB, GB, TB (default: MB)

Code: Select all

# sudo -u nagios /usr/local/nagios/libexec/check_disk -w 10% -c 3% -W 10% -K 3% -u GB -p /Volumes/vol1 -vvv