NRPE: Command 'check_mem" not defined

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

NRPE: Command 'check_mem" not defined

Post by taandrews »

I have a customer who has a check_mem command defined in his nrpe.conf file. If he runs the command locally it works. XI states that it is not define. He sent me his nrpe.conf for verification and its is there and not commented out. I even cloned the service from one if his working machines to no avail. This service use to work, now it claims to be "not defined". I also tried to run it via cli from the XI server but I get the same error.
bolson

Re: NRPE: Command 'check_mem" not defined

Post by bolson »

Hello taandrews,

Could you please send in your Nagios XI System Profile so that we can review it?
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and email it back to us.

This will aid us in troubleshooting your issue.

Thank you!
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: NRPE: Command 'check_mem" not defined

Post by taandrews »

I understand it would be a big help but its sandboxed and also against the policy of my customer. I've made several post and use to be a paying customer of Nagios. I have a pretty good understand of the product. My customer knows Nagios very well also. Neither of us have seen a configured/defined command execute locally but not remotely from the XI server. Also I should add the the server in question has several other command/plugins that run perfectly fine. Its this one check_mem command that isn't working on 5 of 10 servers. The 5 that are no longer running, use to work.

Don't mean to make things difficult but I can't provide the file. I could hand type and redact parts of the conf file if that will help.
bolson

Re: NRPE: Command 'check_mem" not defined

Post by bolson »

Hello taandrews,

Can you copy and paste the syntax you're using on the CLI from the XI server?

Also, the command as it appears in the web gui?

Thank you.
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: NRPE: Command 'check_mem" not defined

Post by taandrews »

My command from the XI server to the client is:
/usr/local/nagios/libexec/check_nrpe -H MY_HOST -c check_mem
bolson

Re: NRPE: Command 'check_mem" not defined

Post by bolson »

Where is the check_mem command defined? On the XI server and/or the remote server being monitored? And in which file(s)
taandrews
Posts: 93
Joined: Thu Mar 10, 2016 1:55 pm

Re: NRPE: Command 'check_mem" not defined

Post by taandrews »

Its defined on the client in the nrpe.conf file. It works locally when checked from the client but not the GUI or CLI from XI.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE: Command 'check_mem" not defined

Post by tgriep »

Could you post your nrpe.cfg file from the remote server so we can check it's settings?
Have you verified the path is correct to the plugin and that it is executable and that it can run as the nagios user?
https://assets.nagios.com/downloads/nag ... utions.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
bolson

Re: NRPE: Command 'check_mem" not defined

Post by bolson »

If you have a file .../nagios/etc/nrpe/common.cfg on the client machine, place (or uncomment) the following line:

Code: Select all

command[check_mem]=/usr/local/nagios/libexec/custom_check_mem -n $ARG1$
And let me know if the command:

Code: Select all

../libexec/check_nrpe -H 192.168.57.13 -c check_mem -a '-w 20 -c 10'
executes properly from the CLI locally and from the XI server.
bolson

Re: NRPE: Command 'check_mem" not defined

Post by bolson »

Also, if necessary, change the paths on my previous post to reflect your environment.
Locked