check_disk not working in CentOS 6.6

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

check_disk not working in CentOS 6.6

Post by bsivavani »

Hi Team,

Check_disk is not working in CentOS 6.6, I am getting below error from management server

[root@auscrp ~]# /usr/local/nagios/libexec/check_nrpe -H 10.172.66.133 -t 30 -c check_disk -a '-w 20% -c 10% -p /dev'
NRPE: Unable to read output
[root@auscrp ~]#

However I am able to see data for Memory and CPU from the same server.

Please let us know why check_disk not giving desired results.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_disk not working in CentOS 6.6

Post by Box293 »

Can you execute this on the 10.172.66.133 server and return the output.

Code: Select all

su nagios
/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: check_disk not working in CentOS 6.6

Post by bsivavani »

Please find below

[root@AUSXHVistaApp01 plugins]# pwd
/usr/lib64/nagios/plugins
[root@AUSXHVistaApp01 plugins]#

[root@AUSXHVistaApp01 plugins]# ./check_disk -w 20% -c 10% -p /dev
DISK OK - free space: / 15739 MB (84% inode=96%);| /=2818MB;15645;17601;0;19557
[root@AUSXHVistaApp01 plugins]#
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_disk not working in CentOS 6.6

Post by rkennedy »

Can you actually try to run those commands as the nagios user -

Code: Select all

su nagios
./check_disk -w 20% -c 10% -p /dev
Also, please run -

Code: Select all

ls -l /usr/lib64/nagios/plugins/
Former Nagios Employee
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: check_disk not working in CentOS 6.6

Post by bsivavani »

[root@XXXX ~]# ls -l /usr/lib64/nagios/plugins/
total 300
-rwxr-xr-x. 1 root root 5355 Sep 23 10:16 check_cpu_stats.sh
-rwxr-xr-x. 1 nrpe nrpe 82847 Nov 23 14:02 check_disk
-rwxr-xr-x. 1 root root 25602 Sep 23 10:16 check_netstat.pl
-rwxr-xr-x. 1 root root 3259 Sep 23 10:16 check_open_files.pl
-rwxr-xr-x. 1 root root 2174 Sep 23 10:16 check_services
-rwxr-xr-x. 1 nrpe nrpe 62873 Nov 23 14:02 check_swap
-rwxr-xr-x. 1 root root 2936 Sep 23 10:16 check_wave
-rwxr-xr-x. 1 root root 710 Sep 23 10:16 check_yum
-rwxr-xr-x. 1 root root 3060 Sep 23 10:15 custom_check_mem
-rwxr-xr-x. 1 root root 915 Sep 23 10:17 custom_check_procs
-rwxr-xr-x. 1 root root 44608 Sep 11 13:06 negate
-rwxr-xr-x. 1 root root 41632 Sep 11 13:06 urlize
-rwxr-xr-x. 1 root root 2791 Sep 11 13:05 utils.sh
[root@XXX ~]#


nagios user not available in this server. Is it mandatory to create nagios user.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_disk not working in CentOS 6.6

Post by lmiltchev »

nagios user not available in this server. Is it mandatory to create nagios user.
The "nagios" user is most probably what you have set up in the nrpe.cfg...

Code: Select all

nrpe_user=nagios
How did you install NRPE and Nagios plugins on the client? Did you use our Linux agent installer?

https://assets.nagios.com/downloads/nag ... _Agent.pdf

When you compile and install nagios plugins you run:

Code: Select all

./configure --with-nagios-user=nagios --with-nagios-group=nagios
so, I would say, "yes", you need to have nagios user on this system. I would recommend using our official documentation for installing the Linux agent (listed above).
Be sure to check out our Knowledgebase for helpful articles and solutions!
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: check_disk not working in CentOS 6.6

Post by bsivavani »

This is CentOS 6.6 not linux agent.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_disk not working in CentOS 6.6

Post by hsmith »

lmiltchev wrote: How did you install NRPE and Nagios plugins on the client?
@bsivavani can you please elaborate on this?
Former Nagios Employee.
me.
Locked