Can’t connect NRPE 2.12 (Nagios 3) to NSClient++ 0.5.0.62

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

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

Can’t connect NRPE 2.12 (Nagios 3) to NSClient++ 0.5.0.62

Postby ssm_mon » Wed Mar 29, 2017 4:24 am

Hello,
We work in a organization with a large installation of Nagios 3.0.6 (around 800 hosts and 10000 services).
We are working on the migration of this installation to a new environment with Nagios Core 4.2.4 and other modules, like Mod_Gearman, for load balancing.
Because of the great difference between these two versions of Nagios, we opted for an installation from scratch instead of an upgrade.
To have a smooth transition we would need to monitor Windows servers simultaneously with «check_nrpe 2.12» (for Nagios 3) and 3.0.1 (for Nagios 4) using a single version of NSClient++ (0.5.0.62).
Although we installed NSClient++ choosing «Enable NRPE server» with «Insecure legacy mode» option, we are not able to use «check_nrpe 2.12» (for Nagios 3). Error messages are:
a) «CHECK_NRPE: Socket timeout after 10 seconds.» on Nagios 3 Server;
b) «source\master\include\socket/connection.hpp:149: Failed to read data: short read» in «nsclient.log» of Windows servers.

We have already created a topic about this issue in NSClient Forum (http://forums.nsclient.org) but we received no replies.

Can someone help us please?
Thanks in advance.
ssm_mon
 
Posts: 7
Joined: Tue Feb 24, 2015 11:37 am

Re: Can’t connect NRPE 2.12 (Nagios 3) to NSClient++ 0.5.0.6

Postby tgriep » Wed Mar 29, 2017 9:46 am

It is probably a configuration setting in your nsclient.ini file on your windows system that is causing the issue.
Can you post the nsclient.ini file and the nsclient.log file from the server that you are having issue with so we can check the settings?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 5634
Joined: Thu Oct 30, 2014 9:02 am

Re: Can’t connect NRPE 2.12 (Nagios 3) to NSClient++ 0.5.0.6

Postby ssm_mon » Wed Mar 29, 2017 12:06 pm

Hello,

Thanks for your reply!

Here is the data you requested:

**********************************
I - «nsclient.ini» file contents:
**********************************

# If you want to fill this file with all available options run the following command:
# nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
# nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help

; TODO
[/settings/default]

; Undocumented key
password = unX4zB9iDZQfuy

; Undocumented key
allowed hosts = 10.50.1.2,127.0.0.1

; TODO
[/settings/NRPE/server]
payload length = 4096
allow arguments = 1
allow nasty characters = true

; Undocumented key
verify mode = none

; Undocumented key
insecure = true

; TODO
[/modules]

; Undocumented key
CheckExternalScripts = 1

; Undocumented key
CheckHelpers = 1

; Undocumented key
CheckEventLog = 1

; Undocumented key
CheckNSCP = 1

; Undocumented key
CheckDisk = 1

; Undocumented key
CheckSystem = 1

; Undocumented key
NRPEServer = 1

***************************************************************************************************************************************************
II - Last 2 lines from «nsclient.log» file
(commands that have originated these errors were issued from Nagios Server 3.0.6 with IP 10.50.1.2):
***************************************************************************************************************************************************
2017-03-29 17:43:24: error:c:\source\master\include\socket/connection.hpp:149: Failed to read data: short read
2017-03-29 17:44:26: error:c:\source\master\include\socket/connection.hpp:149: Failed to read data: short read
ssm_mon
 
Posts: 7
Joined: Tue Feb 24, 2015 11:37 am

Re: Can’t connect NRPE 2.12 (Nagios 3) to NSClient++ 0.5.0.6

Postby tgriep » Wed Mar 29, 2017 1:28 pm

The older check_nrpe command cannot read the larger payload length you have setup in the nsclient.ini file and that is causing the short read message.
You can either upgrade the check_nrpe command to 3.0.1 on the older server so it will be compatible with the larger payload or you can remove the following option from the nsclient.ini file and that should fix the issue for you.
Code: Select all
payload length = 4096
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 5634
Joined: Thu Oct 30, 2014 9:02 am

Re: Can’t connect NRPE 2.12 (Nagios 3) to NSClient++ 0.5.0.6

Postby ssm_mon » Thu Mar 30, 2017 6:16 am

Hello,
Our issue was solved by using your second solution, i.e. removing «payload length» option from nsclient.ini file.
Thank you very much for your fast and efficient help!
ssm_mon
 
Posts: 7
Joined: Tue Feb 24, 2015 11:37 am

Re: Can’t connect NRPE 2.12 (Nagios 3) to NSClient++ 0.5.0.6

Postby tgriep » Thu Mar 30, 2017 9:23 am

Your very welcome. I'll mark this post as solved and lock it. If you have any questions in the future, feel free to create a new post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 5634
Joined: Thu Oct 30, 2014 9:02 am


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 1 guest