NRPE: Command 'check_memory' not defined

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

NRPE: Command 'check_memory' not defined

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NRPE: Command 'check_memory' not defined

Post 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!
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: NRPE: Command 'check_memory' not defined

Post by ofadl »

yea that guide does not help me out too much, which is why I came on here.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NRPE: Command 'check_memory' not defined

Post by slansing »

What is not being helpful in it? It shows the example commands you should add if they are not present.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: NRPE: Command 'check_memory' not defined

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NRPE: Command 'check_memory' not defined

Post 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
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: NRPE: Command 'check_memory' not defined

Post 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
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Command 'check_memory' not defined

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked