NRPE: Command not defined

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Novooctavian
Posts: 13
Joined: Fri Jul 19, 2019 9:33 am

Re: NRPE: Command not defined

Post by Novooctavian »

I hope this is what you are looking for.
service-nonworking.png
service-working.png
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NRPE: Command not defined

Post by Box293 »

Can you look in your objects.cache file on the Nagios server and locate the service and post that config here please.

I feel like it's not actually a problem with the client but the Nagios server.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Novooctavian
Posts: 13
Joined: Fri Jul 19, 2019 9:33 am

Re: NRPE: Command not defined

Post by Novooctavian »

Here you go.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Command not defined

Post by lmiltchev »

The "/ Disk Usage" service is configured correctly on the Nagios XI side of things. I am a bit confused about the use of the "-s" flag in your check_nrpe command...
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -s password -c $ARG1$ $ARG2$
}
Are you passing a password with "-s"? This flag is used for SSL logging. From the plugin's usage:
-s, --ssl-logging=OPTIONS SSL Logging Options
What is really strange is that "check_disk" command is configured properly on the client (remote machine):

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
but you are getting "Command not defined". This command is defined in the /usr/local/nagios/etc/nrpe/common.cfg file, not in the nrpe.cfg, but it should work as you have the following directive in the nrpe.cfg:

Code: Select all

include_dir=/usr/local/nagios/etc/nrpe
The only time check_nrpe "won't see" the command is if you forgot to restart the nrpe daemon. Can you restart nrpe on the remote box, and try your check again? Did it work now?

Does the /etc/xinetd.d/nrpe file exist on the client? If seems like NRPE is running as a standalone daemon, but I would like to make sure of that.

Also, can you double check to make sure that the nrpe.cfg and common.cfg files are the ones from the 172.23.13.43 machine?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Novooctavian
Posts: 13
Joined: Fri Jul 19, 2019 9:33 am

Re: NRPE: Command not defined

Post by Novooctavian »

Hi,
I've resolved this issue by removing NRPE completely and reinstalled it with the following:
wget https://assets.nagios.com/downloads/nag ... ent.tar.gz
tar xzf linux-nrpe-agent.tar.gz
cd linux-nrpe-agent
./fullinstall
I do not know why it did not work in the first place. I am going to follow this procedure again on a 3rd server and hopefully, it will go off without a hitch since I am trying to put together some documentation.

Stephanus
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Command not defined

Post by lmiltchev »

Sounds good! I am glad your issue has been resolved! I will be closing this topic now. If you have any further questions, please start a new thread. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked