Page 1 of 1

check_disk can't give true data on /

Posted: Tue Aug 18, 2015 5:23 am
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.

:)

Re: check_disk can't give true data on /

Posted: Tue Aug 18, 2015 8:52 am
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.

Re: check_disk can't give true data on /

Posted: Tue Aug 18, 2015 10:36 am
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

Re: check_disk can't give true data on /

Posted: Tue Aug 18, 2015 10:52 am
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.

Re: check_disk can't give true data on /

Posted: Tue Aug 18, 2015 11:11 am
by eloyd
I think, look closer. df is showing MB usage, chekc_disk is showing 0GB used.

Re: check_disk can't give true data on /

Posted: Tue Aug 18, 2015 11:24 am
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:

Re: check_disk can't give true data on /

Posted: Tue Aug 18, 2015 11:29 am
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?

Re: check_disk can't give true data on /

Posted: Mon Aug 24, 2015 10:17 am
by pierreleonard78
Sorry,

Yes of course.

Pierre