Page 1 of 2

Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 10:24 am
by tcanthonyii
(No output on stdout) stderr:

All of my services that use Check_NRPE come up with the above error. I'm not sure how long this has been happening but we noticed it today. We are running nsclient++0.4.4.19 and we are an all windows environment.


Any help is appreciated!

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 10:25 am
by tcanthonyii
Also when I run a check commmand it just returns the following

Code: Select all

[nagios@NagiosXIMon ~]$ /usr/local/nagios/libexec/check_nrpe -H 192.168.1.86 -t 30 -c check_service -a 'service=MSSQL$$SQLEXPRESS' 'service=SQLBrowser' 'service=SQLWriter'

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 10:44 am
by tgriep
The "(No output on stdout) stderr:" message means that the plugin ran but didn't return any useful information which you already guessed.
I am guessing that the plugin is corrupted and to find out, can you run the following as root on the Nagios server and post the output?

Code: Select all

ls -l /usr/local/nagios/libexec/check_nrpe
/usr/local/nagios/libexec/check_nrpe -V
Thanks

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 10:46 am
by lmiltchev
In addition to what tgriep said, run the following command from the CLI on the Nagios XI server, and show the output:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.86
Also, post both files, the nsclient.ini and nsclient.log from the 192.168.1.86 machine.

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 11:49 am
by tcanthonyii
Tom here is from what you were asking


Code: Select all

[root@NagiosXIMon ~]# ls -l /usr/local/nagios/libexec/check_nrpe 
-rwxrwxr-x 1 apache nagios 0 May  5 11:18 /usr/local/nagios/libexec/check_nrpe
[root@NagiosXIMon ~]# /usr/local/nagios/libexec/check_nrpe -V                   
[root@NagiosXIMon ~]#

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 11:54 am
by tcanthonyii
lmiltchev wrote:In addition to what tgriep said, run the following command from the CLI on the Nagios XI server, and show the output:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.86
Also, post both files, the nsclient.ini and nsclient.log from the 192.168.1.86 machine.

Code: Select all

[root@NagiosXIMon ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.202
[root@NagiosXIMon ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.77
[root@NagiosXIMon ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.86
[root@NagiosXIMon ~]#
Nothing comes back. These machines are getting good stats back on other checks though.

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 12:28 pm
by lmiltchev
[root@NagiosXIMon ~]# ls -l /usr/local/nagios/libexec/check_nrpe
-rwxrwxr-x 1 apache nagios 0 May 5 11:18 /usr/local/nagios/libexec/check_nrpe
Hmm, I am not sure what happened here, but the size of check_nrpe is zero... If you are still keeping your original install directory, try the following:

Code: Select all

cd /tmp/nagiosxi/subcomponents/nrpe
./install
Then, verify that check_nrpe was installed:

Code: Select all

ls -l /usr/local/nagios/libexec/check_nrpe
/usr/local/nagios/libexec/check_nrpe -V

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 1:18 pm
by tcanthonyii
OK so Reinstall did it

Code: Select all

[root@NagiosXIMon nrpe]# /usr/local/nagios/libexec/check_nrpe -V
/usr/local/nagios/libexec/check_nrpe: invalid option -- 'V'

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.

[root@NagiosXIMon nrpe]#

Right afterwards I started getting alerts for services. Any idea what caused that?

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 1:27 pm
by lmiltchev
Right afterwards I started getting alerts for services.
Can you elaborate? What checks are failing?

Show us an example of a "failing" check, run from the command line, along with the output of it. Also, show us how the check is configured in XI, and how the command is configured on the client (remote machine).

Re: Check_NRPE services all coming back with (No output

Posted: Thu May 11, 2017 1:50 pm
by tcanthonyii
No more failing checks. The re-install fixed me.

I was just asking about if you had any ideas how NRPE would have gotten corrupted? Regardless we are now functional.