Page 1 of 1
NagiosXI localhost check_disk getting errors with ARGS
Posted: Fri Mar 24, 2017 9:24 am
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
Re: NagiosXI localhost check_disk getting errors with ARGS
Posted: Fri Mar 24, 2017 11:42 am
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
Re: NagiosXI localhost check_disk getting errors with ARGS
Posted: Fri Mar 24, 2017 11:48 am
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
Re: NagiosXI localhost check_disk getting errors with ARGS
Posted: Fri Mar 24, 2017 1:45 pm
by lmiltchev
You run the following command locally, on the Nagios XI server:
and the following command against the client (remote box):
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.
Re: NagiosXI localhost check_disk getting errors with ARGS
Posted: Fri Mar 24, 2017 2:03 pm
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$
Re: NagiosXI localhost check_disk getting errors with ARGS
Posted: Fri Mar 24, 2017 2:21 pm
by cdienger
Was there anything else we can help with or can we lock the thread?
Re: NagiosXI localhost check_disk getting errors with ARGS
Posted: Fri Mar 24, 2017 3:19 pm
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?
Re: NagiosXI localhost check_disk getting errors with ARGS
Posted: Mon Mar 27, 2017 9:27 am
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!