Page 1 of 1
Upgrade to 5.5 broke check_nrpe
Posted: Mon Jul 02, 2018 3:27 pm
by cbroschard
After running the upgrade today from 5.4.13 to 5.5 of NAGIOS XI, we started receiving the following error for all Windows checks which do use nsclient++: Could not construct return packet in NRPE handler check client side (nsclient.log) logs....
I googled the error and the suggested fix was to allow_arguments 1 and set the port to 5666 which were already set. Since this system is necessary for our monitoring we reverted back to 5.4.13 and the checks are working again. So I don't want to try the upgrade again until I know what could cause that error.
Re: Upgrade to 5.5 broke check_nrpe
Posted: Mon Jul 02, 2018 4:32 pm
by lmiltchev
We will try to recreate the issue in-house, but we need some additional information. What is the NSClient++ version that you are currently using? Show us an example config of the service that failed after the upgrade, the nsclient.ini file, and the entire nsclient.log. Obfuscate sensitive data. Thank you!
Re: Upgrade to 5.5 broke check_nrpe
Posted: Tue Jul 03, 2018 7:49 am
by cbroschard
Awesome - thanks! We are using nsclient++ 0.3.9.328
I have attached both the nsclient.log and ini file.
Here is an example service that failed:
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
CheckDriveSize -a MaxWarn=95% MaxCrit=97% CheckAllOthers Drive=M:
Re: Upgrade to 5.5 broke check_nrpe
Posted: Tue Jul 03, 2018 10:17 am
by lmiltchev
Your check broke, because of incompatibility between NRPE (v. 3) and your NSClient++ agent (v. 0.3.9).
Note: The NRPE has been upgraded during the Nagios XI upgrade from 2.15 to 3.2.1.
So, you can upgrade your NSClient++ agent to the latest or you can try changing the check_nrpe command from this:
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
to this:
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -2 -c $ARG1$ $ARG2$
-2, --v2-packets-only Only use version 2 packets, not version 3
You can see all of the check_nrpe options (help menu) by running from the command line:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -h
Save and apply configuration.
FYI, if you are having issues with ONLY this check, and you don't want to change the check_nrpe command (which will affect all services, that are using it), you could create a new, custom command, for example, "check_nrpe_2". Then, you can modify your service to use "check_nrpe_2", instead of "check_nrpe".
Examples:
Code: Select all
define command {
command_name check_nrpe_2
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -2 -c $ARG1$ $ARG2$
}
Code: Select all
define service {
host_name myhost
service_description myservice
use mytemplate
check_command check_nrpe_2! CheckDriveSize -a MaxWarn=95% MaxCrit=97% CheckAllOthers Drive=M:
...
}
Re: Upgrade to 5.5 broke check_nrpe
Posted: Tue Jul 03, 2018 10:26 am
by cbroschard
Ok makes sense so I have a question - we have a ton of services that I didn't list - can we make the changes one-by-one now before the upgrade to add the -2 option or do we need to upgrade first and then make changes?
Re: Upgrade to 5.5 broke check_nrpe
Posted: Tue Jul 03, 2018 10:48 am
by lmiltchev
If you upgraded to the latest stable version of NSClient++, you wouldn't be needing to add "-2" to the check_nrpe command. However, keep in mind that the syntax of the NSClient++ config file is quite different in newer versions. Even the name is different - NSC.ini vs nsclient.ini. Make a backup of your NSC.ini file just in case you need to look up some of the commands or you decide to revert back to the older version of NSClient++.
Another option would be to switch to
NCPA, which is better supported agent as it is our own. NSClient++ is not developed or maintained by us (Nagios).
Re: Upgrade to 5.5 broke check_nrpe
Posted: Tue Jul 03, 2018 10:50 am
by cbroschard
Ok makes sense then - our Linux systems were working correctly just not the Windows. It makes sense I'll see about getting the client switched.
Thanks!
Re: Upgrade to 5.5 broke check_nrpe
Posted: Tue Jul 03, 2018 10:57 am
by lmiltchev
Sounds good! Let us know if it is OK to close this topic.
Re: Upgrade to 5.5 broke check_nrpe
Posted: Tue Jul 03, 2018 2:53 pm
by cbroschard
You can close it - it's going to be a bit before we update so no point in keeping this open when we know the solution. Thanks again!
Re: Upgrade to 5.5 broke check_nrpe
Posted: Tue Jul 03, 2018 3:03 pm
by scottwilkerson
cbroschard wrote:You can close it - it's going to be a bit before we update so no point in keeping this open when we know the solution. Thanks again!
Locking