NRPE command errors in web interface

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
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

NRPE command errors in web interface

Post by xpac »

So I set up an Nagios server and added a few hosts that will be monitored in my test environment. I just followed a regular plain jane install and haven't added any plugins yet.

When I look at the first remote host in the web interface under "View Status Detail for this Host" I see a few status errors:

NRPE: Command 'check_total_users' not defined
NRPE: Command 'check_ftp' not defined
NRPE: Command 'check_ssh' not defined

I'm wondering if this is normal with a brand new installation, or did I just screw something up (very possible :lol: )
User avatar
millisa
Posts: 69
Joined: Thu Jan 16, 2014 11:13 pm
Location: Austin, TX
Contact:

Re: NRPE command errors in web interface

Post by millisa »

Here is your reference on NRPE and how it works
Those are commands that are not defined on the remote host you are trying to monitor with nrpe. It's not saying 'nagios doesnt know what these commands are' it's saying 'nagios asked NRPE on the other host for check_total_users and the NRPE service on that other server doesnt know what this command is'

Nagios is running something along the lines of 'check_nrpe -H ip-or-hostname -c remotecommand-like-check_total_users'

The check_total_users / check_ftp / check_ssh needs to exist as a defined command that can be run in the nrpe config on that remote host you are checking.

For example, a remote system (let's say it is 192.168.123.59 for hostname 'superduperhost4') might have the following defined in its nrpe config:

Code: Select all

command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
I would then have a check on the nagios server that is checking it with a definition like:

Code: Select all

define command {
        command_name    check_nrpe_check-procs
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_total_procs
}
and a service definition like

Code: Select all

define service{
        use                             myservicetemplate
        host_name                       superduperhost4   #this will make a service check use HOSTADDRESS 192.168.123.59 from the host definition
        service_description             nrpe-totalprocs-check
        check_command                   check_nrpe_check-procs
        }
It'd be normal to see that the command's aren't defined until you define them on the remote hosts NRPE (and in this case, if you are checking your local nagios instance, you'd need to set them up in your local nagios's NRPE config).
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE command errors in web interface

Post by abrist »

millisa is absolutely on point. Have you had a chance to revisit your configs xpac?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: NRPE command errors in web interface

Post by xpac »

Sorry, I forgot this thread was still open :D

Yes I was able to figure it out, and fix the commands, etc so this thread can be closed :D
Locked