check_disk - wrong performance data

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rgerbranda
Posts: 2
Joined: Thu Apr 16, 2015 12:52 pm

check_disk - wrong performance data

Post by rgerbranda »

Hi all,

I have a strange issue with the performance data of check_disk

This is the output of the plugin

Code: Select all

root@o-kennisnet-entree:~# /usr/lib/nagios/plugins/check_disk -w 10% -c 5% -p /
DISK WARNING - free space: / 2238 MB (7% inode=38%);| /=28144MB;28806;30406;0;32007
performance data:
- space used: 28144
- warning threshold: 28806
- critical threshold: 30406

The status is "warning" but the space used value < warning threshold ?!?!


This is the output of df

Code: Select all

root@o-kennisnet-entree:~# df /
Filesystem                            1K-blocks     Used Available Use% Mounted on
/dev/mapper/o--kennisnet--entree-root  32776056 28820052   2292084 93% /

What is going wrong?

I'm using the following version:

Code: Select all

check_disk v1.4.15 (nagios-plugins 1.4.15)
Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>
Copyright (c) 1999-2008 Nagios Plugin Development Team
Kind regards,
Remko
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: check_disk - wrong performance data

Post by jdalrymple »

Code: Select all

[root@localhost libexec]# ./check_disk --help
check_disk v2.0.3 (nagios-plugins 2.0.3)
Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>
Copyright (c) 1999-2014 Nagios Plugin Development Team
        <devel@nagios-plugins.org>

This plugin checks the amount of used disk space on a mounted file system
and generates an alert if free space is less than one of the threshold values
check_disk is monitoring free space, not used space. If the value of free space is LESS THAN the threshold you set, that's when things are bad. Make sense?
rgerbranda
Posts: 2
Joined: Thu Apr 16, 2015 12:52 pm

Re: check_disk - wrong performance data

Post by rgerbranda »

Thanks for your thoughts.

I found a new parameter in version 2.0.3 of check_disk that solves my issue:

Code: Select all

 -f, --freespace-ignore-reserved
    Don't account root-reserved blocks into freespace in perfdata
With the new results:

Code: Select all

root@o-kennisnet-entree:~/nagios-plugins-2.0.3/plugins# ./check_disk -f -w 10% -c 5% -p /
DISK WARNING - free space: / 2205 MB (7% inode=38%);| /=28176MB;27343;28862;0;30382
Locked