check_disk can't give true data on /

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
pierreleonard78
Posts: 6
Joined: Tue Aug 18, 2015 4:46 am

check_disk can't give true data on /

Post by pierreleonard78 »

Hi all,

I install nagios and is happy except for the check_disk on /

I test on the serveur with / and with /dev/sda7 which is the partition with the following command the same for /var/log and /dev/shm which are OK :

[root@kstoocky01 etc]# /usr/local/nagios/libexec/check_disk -u GB -w 60% -c 80% -p /dev/sda7
DISK CRITICAL - free space: / 0 GB (38% inode=77%);| /=0GB;0;0;0;0

but if I do df -h / I get :

[root@kstoocky01 etc]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 969M 569M 350M 62% /

I work with a centos 6.6 and the last release of nagios and nrpe. I try some other parameters of check_disk but with no other result.

Is there something to do on the server or using another plugins ?

Many thank's in advance.

:)
La vie est belle Pierre Léonard
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: check_disk can't give true data on /

Post by eloyd »

Change "-p /dev/sda7" to "-p /" and see if that works.

Also, this is a Nagios Core or Nagios XI issue, not a Nagios Incident Manager issue, so you put this in the wrong topic. I am sure one of the moderators will be happy to move it though.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
pierreleonard78
Posts: 6
Joined: Tue Aug 18, 2015 4:46 am

Re: check_disk can't give true data on /

Post by pierreleonard78 »

Hi Eliod,

Unfortunately, the answer is the same.

I had just deployed nrpe on my different clusters and serveurs and the result is the same.


[root@xstoocky02 ~]# /usr/local/nagios/libexec/check_disk -u GB -w 60% -c 80% -p /
DISK CRITICAL - free space: / 0 GB (4% inode=72%);| /=0GB;0;0;0;0


unlucky.

Is it a bug in the last release ?
nrpe-2.15.tgz

or a cenros configuration which is the same on all or serveurs ?

I have no idea.

Many thank's
La vie est belle Pierre Léonard
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_disk can't give true data on /

Post by hsmith »

pierreleonard78 wrote:Hi Eliod,

Unfortunately, the answer is the same.

I had just deployed nrpe on my different clusters and serveurs and the result is the same.


[root@xstoocky02 ~]# /usr/local/nagios/libexec/check_disk -u GB -w 60% -c 80% -p /
DISK CRITICAL - free space: / 0 GB (4% inode=72%);| /=0GB;0;0;0;0


unlucky.

Is it a bug in the last release ?
nrpe-2.15.tgz

or a cenros configuration which is the same on all or serveurs ?

I have no idea.

Many thank's

You may want to run a

Code: Select all

/usr/local/nagios/libexec/check_disk -h


and look at the output of that command.

You're triggering a warning right now because there's less than 60/80% free. I'm guessing you want this to be opposite? Warning when 60/80 is used up?

Please let me know if I am understanding this wrong.
Former Nagios Employee.
me.
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: check_disk can't give true data on /

Post by eloyd »

I think, look closer. df is showing MB usage, chekc_disk is showing 0GB used.
Last edited by eloyd on Tue Aug 18, 2015 11:33 am, edited 1 time in total.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
pierreleonard78
Posts: 6
Joined: Tue Aug 18, 2015 4:46 am

Re: check_disk can't give true data on /

Post by pierreleonard78 »

Hi eliod,

df -h give :
[root@xstoocky02 ~]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sdm8 673M 609M 30M 96% /

Ok I have found the disk usage is critical and i see 0 because I aks in GB when I ask in MB I get :

[root@xstoocky02 ~]# /usr/local/nagios/libexec/check_disk -u MB -w 20% -c 30% -p /
DISK CRITICAL - free space: / 29 MB (4% inode=72%);| /=608MB;537;470;0;672

Whixh is better

Sorry for that parameter error.

I thank you very much all of you four your help

:oops:
La vie est belle Pierre Léonard
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_disk can't give true data on /

Post by hsmith »

pierreleonard78 wrote:Hi eliod,

df -h give :
[root@xstoocky02 ~]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sdm8 673M 609M 30M 96% /

Ok I have found the disk usage is critical and i see 0 because I aks in GB when I ask in MB I get :

[root@xstoocky02 ~]# /usr/local/nagios/libexec/check_disk -u MB -w 20% -c 30% -p /
DISK CRITICAL - free space: / 29 MB (4% inode=72%);| /=608MB;537;470;0;672

Whixh is better

Sorry for that parameter error.

I thank you very much all of you four your help

:oops:
This is working for you, then?

Am I all right to close this thread?
Former Nagios Employee.
me.
pierreleonard78
Posts: 6
Joined: Tue Aug 18, 2015 4:46 am

Re: check_disk can't give true data on /

Post by pierreleonard78 »

Sorry,

Yes of course.

Pierre
La vie est belle Pierre Léonard
Locked