I've downloaded your nagios xi vm, setup another host to monitor, installed nrpe on this other host. I am receiving an error when trying to monitor via nagios interface. I'm able to run it manually from both servers on the command line but not through the nagios webpage (http://<ipaddress>/nagiosxi/#). Any ideas on why this won't work?
check_nrpe!check_disk!20%!10%!/
Oct 21 12:25:08 localhost nagios: SERVICE NOTIFICATION: nagiosadmin;10.100.11.36;Disk Usage;UNKNOWN;xi_service_notification_handler;Unknown argument
-- nagios host
[root@localhost nagios]# /usr/local/nagios/libexec/check_nrpe -H 10.100.11.36 -t 30 -c check_disk -a '20%' '10%' '/'
DISK OK - free space: / 7390 MB (84% inode=86%);| /=1375MB;7406;8332;0;9258
-- other host trying to monitor
root@d-gp2-couch-1:/etc/nagios# /usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /
DISK OK - free space: / 7390 MB (84% inode=86%);| /=1375MB;7406;8332;0;9258
nagios xi check_disk unknown argument
Re: nagios xi check_disk unknown argument
This is where it gets confusing.
The arguments that are setup in the NRPE Agent and arguments that are setup in XI don't necessary have to line up and that could be causing the issue.
If you change the command in XI like below, that should work for you.
The -a for the check_nrpe command says to send arguments to the remote NRPE system and the 20% will match the $ARG1$ that is defined in the nrpe.cfg file on the remote system.
And 10% will be $ARG2$ and / will be $ARG3$
If you look at the entry in the nrpe.cfg file, you will see how the arguments are defined.
I hope this helps out.
The arguments that are setup in the NRPE Agent and arguments that are setup in XI don't necessary have to line up and that could be causing the issue.
If you change the command in XI like below, that should work for you.
Code: Select all
check_nrpe!check_disk!-a '20% 10% /'And 10% will be $ARG2$ and / will be $ARG3$
If you look at the entry in the nrpe.cfg file, you will see how the arguments are defined.
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: nagios xi check_disk unknown argument
Depending on how you installed the Linux agent on the remote box (client), your command could be defined in the "common.cfg".If you look at the entry in the nrpe.cfg file, you will see how the arguments are defined.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
stephensonkyle
- Posts: 2
- Joined: Tue Apr 30, 2013 3:59 pm
Re: nagios xi check_disk unknown argument
I had installed the agent using apt-get install nagios-nrpe-server. For some reason this was not compatible with xi. I downloaded and installed the nrpe agent from the xi link and that seemed to work with the new format of " check_nrpe!check_disk!-a '20% 10% /' " instead of nagios core format of " check_nrpe!check_disk!20%!10%!/ "
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: nagios xi check_disk unknown argument
It's generally a better idea to install from Nagios official sources using Nagios official documentation as that is what is tested and supported.
It sounds like your issue is resolved, is it ok to close this thread?
It sounds like your issue is resolved, is it ok to close this thread?
Previous Nagios employee