NRPE: Command 'check_mem' not defined

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: NRPE: Command 'check_mem' not defined

Postby vkodanam » Thu Nov 21, 2019 9:19 am

scottwilkerson wrote:You have changed the path and the arguments in the different commands you have shown
if this is in /etc/nagios/nrpe.cfg
vkodanam wrote:
Code: Select all
command[check_mem]=/usr/local/nagios/libexec/check_mem.sh -w 85 -c 95


Can you run that from the command line on the remote server?
Code: Select all
/usr/local/nagios/libexec/check_mem.sh -w 85 -c 95


can you also show again the output of
Code: Select all
ps -ef|grep nrpe


I got it to work by using another perl script. One question I do have is, when I restart the Nrpe service using the service xinetd start/ restart, it only starts the process under root/ logged in user and not under Nagios. I tried su into Nagios while I was root, and when I run the command it asks me for password for Nagios, which I know is not set. I hit return/ enter, and it says access denied. How can I fix this? Thanks for your help!
vkodanam
 
Posts: 12
Joined: Thu Oct 10, 2019 10:16 am

Re: NRPE: Command 'check_mem' not defined

Postby scottwilkerson » Thu Nov 21, 2019 9:45 am

If you have it running under xinetd, xinetd runs as root, but it will use the user you define in the xinetd configuration file for nrpe when launching the process

This file is usually located in /etc/xinetd.d/nrpe

In that file you should see something like
Code: Select all
        user            = nagios
        group           = nagios


and that is the user/group that will be used
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17024
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: NRPE: Command 'check_mem' not defined

Postby scottwilkerson » Thu Nov 21, 2019 9:47 am

I also want to note that earlier you showed this
Code: Select all
ps -ef|grep nrpe
nagios    1548     1  0 Oct29 ?        00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f


Which means this process was started a different way (other than xinetd), so you need to make sure you don't have 2 processes competing for the same port....
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17024
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Previous

Return to Nagios Core

Who is online

Users browsing this forum: MSN [Bot] and 20 guests