NRPE Problem after Nagios Upgrade to 5.5.0

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by lmiltchev »

Sure, we will keep the topic open for the time being.
Be sure to check out our Knowledgebase for helpful articles and solutions!
aptmis
Posts: 26
Joined: Tue Dec 27, 2016 8:52 am

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by aptmis »

Well, now we jumped from "frying to pan to fire", now I get following message:

Unknown
(No output returned from plugin)
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
<bindaddr> = bind to local address
-4 = user ipv4 only
-6 = user ipv6 only
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by jomann »

Can you take the command that one of the services that is not working and run it from the command line? Or in the CCM. And give us the poutput?

Also can you run the following:

Code: Select all

service nrpe status
and let us know the output.

I think there could be a couple problems. The linux agent isn't actually what is being installed on the system when you install XI's NRPE. The original issue was likely that the configuration file got overwritten.

Now that you've installed a new version there may be two different daemons, although they should both be the same binary.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
aptmis
Posts: 26
Joined: Tue Dec 27, 2016 8:52 am

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by aptmis »

Here is the output of the command I tried to run in CCM:

[[email protected] ~]$ /usr/local/nagios/libexec/check_nrpe -H 10.100.0.49 -t 30 -c check_disk -a '-w 20% -c 10% -p /' -2

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
<bindaddr> = bind to local address
-4 = user ipv4 only
-6 = user ipv6 only
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.

and for the Command:
[root@localhost ~]# nrpe: unrecognized service
-bash: nrpe:: command not found
aptmis
Posts: 26
Joined: Tue Dec 27, 2016 8:52 am

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by aptmis »

[root@localhost ~]# [root@localhost ~]# service nrpe status
-bash: [root@localhost: command not found
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by jomann »

You can't use the -2 argument with nrpe version 2. Since you installed the nrpe-linux-agent you are missing some of the configuration for NRPE and you're using the older version. That is likely why you're getting the full help menu when trying to run a command.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
aptmis
Posts: 26
Joined: Tue Dec 27, 2016 8:52 am

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by aptmis »

Understood,
Now, how do I clear this mess?
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by jomann »

I would suggest finding your nrpe config and making sure you have a backup. Then, I would download the current latest Nagios XI tarball, extract it, and run the nrpe upgrade, like so:

Code: Select all

cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xf xi-latest.tar.gz
cd nagiosxi/subcomponents/nrpe
./upgrade
This will install the latest version of NRPE and then once that has installed, verify the configuration and make sure to add any of the missing commands that you need. Now, once it's upgraded back to version 3, you can use the -2 value if you have any checks that are having issues with packet size.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
aptmis
Posts: 26
Joined: Tue Dec 27, 2016 8:52 am

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by aptmis »

OK, I tried, and the nightmare continues.
Now if I remove "-2" from the end of the command, I get following error message:
"Critical(Return code of 255 for service 'Yum Updates' on host 'nagiosna.af.local' was out of bounds)
connect to host 10.100.0.49 port 5666: Connection refused"

If I add "-2" at the end of the command, I get usual message, I was getting before. I wish I would not have applied these new updates, it was working fine. I highly request next time when you release updates, please have it thoroughly tested. Because we don't have a time to waste behind this.

the message I get after adding "-2" at the end of the command

(No output returned from plugin)
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
<bindaddr> = bind to local address
-4 = user ipv4 only
-6 = user ipv6 only
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.

Hope to find some solution to this!!!!
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: NRPE Problem after Nagios Upgrade to 5.5.0

Post by jomann »

Can you show us the /usr/local/nagios/etc/nrpe.cfg file and also the check that you are running, preferably the full line that you are running. You can use the Yum Updates one that we know is having an issue in your last post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked