Page 1 of 1

NRPE: Command 'check_memory' not defined

Posted: Tue Jun 11, 2013 1:04 pm
by ofadl
Hello everyone,

So I just finished downloading nrpe server on a couple of my Linux servers, and now getting a " NRPE: Command 'check_memory' not defined" on my nagios website, anyone know how to fix this?

Re: NRPE: Command 'check_memory' not defined

Posted: Tue Jun 11, 2013 1:24 pm
by slansing
It sounds like the NRPE agent may not be totally configured on the remote host's end, you will need to add the command definitions in the nrpe.cfg.

I'd take a look at the setup section here:

http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf

Let us know if you have any issues!

Re: NRPE: Command 'check_memory' not defined

Posted: Tue Jun 11, 2013 1:39 pm
by ofadl
yea that guide does not help me out too much, which is why I came on here.

Re: NRPE: Command 'check_memory' not defined

Posted: Tue Jun 11, 2013 1:43 pm
by slansing
What is not being helpful in it? It shows the example commands you should add if they are not present.

Re: NRPE: Command 'check_memory' not defined

Posted: Tue Jun 11, 2013 1:53 pm
by ofadl
I am only using 3 services for my Linux servers, and am doing fine with two of the services. I am having a problem with the "Memory Usage" service

Re: NRPE: Command 'check_memory' not defined

Posted: Tue Jun 11, 2013 2:07 pm
by slansing
You should be able to add the following definition into the nrpe.cfg files under the currently listed commands:

Code: Select all

command[check_mem]=/usr/local/nagios/libexec/check_mem.sh
Then save the file, and restart xinetd, or the daemon you are using:

Code: Select all

service xinetd restart
Then run the following from Nagios:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <hostaddress> -C check_mem

Re: NRPE: Command 'check_memory' not defined

Posted: Tue Jun 11, 2013 2:13 pm
by ofadl
I just tried to run the last command on nagios, and it said there was no file or directory, so I went into the libexec folder, and check_nrpe was not there

Re: NRPE: Command 'check_memory' not defined

Posted: Tue Jun 11, 2013 2:50 pm
by lmiltchev
Have you installed check_nrpe on the nagios server?
d) Monitoring Host Setup
On the monitoring host (the machine that runs Nagios), you'll need to do just a few things:
– Install the check_nrpe plugin
– Create a Nagios command definition for using the check_nrpe plugin
– Create Nagios host and service definitions for monitoring the remote host
...
I know you said that the guide "didn't help you much", but maybe you should try reading it again:
http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf