nagios-plugins 2.2.1 check_http hangs with --no-body/-N

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
epurins
Posts: 8
Joined: Wed Oct 02, 2019 5:16 pm

nagios-plugins 2.2.1 check_http hangs with --no-body/-N

Post by epurins »

Hi team,

While testing out an upgrade from 5.4.10 to latest release 5.6.7 on a self-managed install from tar.gz on centos 7.3, we see a large number of http checks failing.

For some number of these, they use the '-N' option ('--no-body').

When checking the cli manually, removing the '-N' option allows the check to succeed.
Any use of '-N' hangs the check_http indefinitely.

In the UI, this manifests as HTTP checks failing with 'Critical socket error'.
A search for fixes upstream shows this was previously an issue, and might be addressed with newer versions of nagios-plugins
https://github.com/nagios-plugins/nagio ... 31b6ac2c38

The github patch doesn't really apply cleanly to the downloaded code as deployed with the nagiosxi tar bundle.
Would someone with more experience be able to double check this out?

-e
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: nagios-plugins 2.2.1 check_http hangs with --no-body/-N

Post by benjaminsmith »

Hello @epurins,

The patch has been merged into the Nagios Plugins maintenance branch by one of our developers and will be included in the next release.
https://github.com/nagios-plugins/nagio ... s/pull/402

You can either wait for the next Nagios Plugins release, or follow the instructions on the page below to compile the maintenance branch. Please note, this has not been finished and tested by QA, so install on a test server first. If you decide to wait, I would recommend dropping the -N option temporarily for this check.

https://github.com/2005wind/nagios-plugins/tree/maint

License Entitlements
With every purchase we offer 3 separate activation of XI licenses. One for production, one for testing, and one for high availability. We always recommend upgrading or modifying the test server first before making changes to the production server.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: nagios-plugins 2.2.1 check_http hangs with --no-body/-N

Post by benjaminsmith »

Hello @epurins,

Just an update, if you decide to compile the maintenance branch, when you run the make install it will copy everything over to the plugins directory. It's recommended to just compile ( run make ) and then copy over only the plugin that you need.

Again, I would recommend doing this on a test server before transferring to production.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
epurins
Posts: 8
Joined: Wed Oct 02, 2019 5:16 pm

Re: nagios-plugins 2.2.1 check_http hangs with --no-body/-N

Post by epurins »

Thanks for the quick turnaround, Benjamin.

My business requirements mean I need to move faster than the plugins release cadence, so I'll be trying this as a solution.

Just to clarify, the maintenance branch here - https://github.com/nagios-plugins/nagio ... tree/maint - is the right one to compile/confirm it addresses the issue?

I hear your advice about making sure to test things outside of production.
I appreciate your guidance and support, and look forward to testing this out and engaging with this community.

:)

-e
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: nagios-plugins 2.2.1 check_http hangs with --no-body/-N

Post by benjaminsmith »

Hi,

Yes, that's correct. Compile from the maintenance branch and then copy of the new version of check_http. As mentioned, not recommended to replace all the plugins in the production server with plugins compiled from the maintenance branch.

Here's the general documentation on compiling Nagios Plugins.

Nagios Plugins - Installing Nagios Plugins From Source
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
epurins
Posts: 8
Joined: Wed Oct 02, 2019 5:16 pm

Re: nagios-plugins 2.2.1 check_http hangs with --no-body/-N

Post by epurins »

Thanks,

Those docs helped.
Rebuilding the maint branch of plugins and replacing just the check_http binary fixes the issue in the test server.

One thing I noticed while working on the test server is that duplicate scheduled reports are sent from the test server. Email notifications are disabled, but that must not control the reports feature. I've temporarily halted nagios, and disabled the cron entries in /etc/cron.d/nagiosxi

What's the right way to turn off the scheduled reports, so I'm not sending any extra signals?

-e
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: nagios-plugins 2.2.1 check_http hangs with --no-body/-N

Post by benjaminsmith »

Hello @epurins,

That's good to hear. As far as the schedule reports, there isn't a global setting to enable or disable scheduled reports. You can disable the reports in the schedule reports settings.
scheduled-report.png
The other option, as you mentioned, is to disable the cron jobs for the reports. These are located in the apache cron ( /var/spool/cron/apache ). You could just comment them out temporarily.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked