NagiosXI localhost check_disk getting errors with ARGS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
akepley
Posts: 138
Joined: Wed Sep 11, 2013 1:09 pm

NagiosXI localhost check_disk getting errors with ARGS

Post by akepley »

Starting seeing localhost check_disk only having issues. All other services are returning just fine. Turned on dont_blame_nrpe =1 and ran from command line. Below is an example of both localhost and remote host:

Code: Select all

[email protected] libexec$ ./check_nrpe -H 127.0.0.1 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
DISK CRITICAL - 20% is not accessible: No such file or directory
[email protected] libexec$ ./check_nrpe -H info01.ec2.prod.azw.nasba -t 30 -c check_disk -a '-w 20% -c 10% -p /'
DISK OK - free space: / 5085 MB (53% inode=87%);| /=4352MB;7960;8955;0;9950
[email protected] libexec$ ./check_nrpe -H 127.0.0.1
NRPE v2.15
[email protected] libexec$ ./check_nrpe -H info01.ec2.prod.azw.nasba
NRPE v2.14
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NagiosXI localhost check_disk getting errors with ARGS

Post by mcapra »

From the local Nagios XI machine, can you share the output of:

Code: Select all

/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
ls -al /
df -h
Former Nagios employee
https://www.mcapra.com/
akepley
Posts: 138
Joined: Wed Sep 11, 2013 1:09 pm

Re: NagiosXI localhost check_disk getting errors with ARGS

Post by akepley »

Code: Select all

[email protected] libexec$ /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
DISK OK - free space: / 4851 MB (51% inode=82%);| /=4587MB;7960;8955;0;9950
[email protected] libexec$ ls al /
ls: cannot access al: No such file or directory
/:
bin  boot  cgroup  dev  etc  home  lib  lib64  lost+found  media  misc  mnt  net  opt  proc  root  run  sbin  selinux  srv  store  sys  tmp  usr  var  varnew
[email protected] libexec$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      9.8G  4.5G  4.8G  49% /
tmpfs           3.9G   12K  3.9G   1% /dev/shm
/dev/xvdk1      4.8G  1.5G  3.2G  32% /var
/dev/xvdj1      4.8G  568M  4.0G  13% /var/log
/dev/xvdg1      4.8G  1.9G  2.8G  40% /var/log/audit
/dev/xvdh1      4.8G  859M  3.8G  19% /tmp
/dev/xvdi1      4.8G   67M  4.5G   2% /home
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI localhost check_disk getting errors with ARGS

Post by lmiltchev »

You run the following command locally, on the Nagios XI server:

Code: Select all

[email protected] libexec$ ./check_nrpe -H 127.0.0.1 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
and the following command against the client (remote box):

Code: Select all

[email protected] libexec$ ./check_nrpe -H info01.ec2.prod.azw.nasba -t 30 -c check_disk -a '-w 20% -c 10% -p /'
Is the "check_disk" command defined the same way on both machines?

Note: You will find the command's definition in the "/usr/local/nagios/etc/nrpe/common.cfg" or in the "/usr/local/nagios/etc/nrpe.cfg" file.
Be sure to check out our Knowledgebase for helpful articles and solutions!
akepley
Posts: 138
Joined: Wed Sep 11, 2013 1:09 pm

Re: NagiosXI localhost check_disk getting errors with ARGS

Post by akepley »

Ok, remote client had a nrpe directory with common.cfg as well as the nrpe.cfg under etc.
NagiosXI server only had nrpe.cfg under etc.

The check_disk command on the remote client in common.cfg fixed the issue with NagiosXI server config:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NagiosXI localhost check_disk getting errors with ARGS

Post by cdienger »

Was there anything else we can help with or can we lock the thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
akepley
Posts: 138
Joined: Wed Sep 11, 2013 1:09 pm

Re: NagiosXI localhost check_disk getting errors with ARGS

Post by akepley »

I suppose we can lock it. I'm confused why the NagiosXI server itself was missing this file if it needed it though. Will I run into other command issues?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI localhost check_disk getting errors with ARGS

Post by lmiltchev »

The check_nrpe plugin is usually used to monitor remote machines, not the local Nagios XI server. The "common.cfg" is installed only when you run our official Linux agent installer script, which is normally run on remote boxes. The commands defined in this config are used by the Linux server wizard that ships with XI. I hope this makes sense.

I will be closing this topic now. If you have any more questions/issues, please start a new thread. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked