Comment 7 for bug 1875517

Revision history for this message
Haw Loeung (hloeung) wrote : Re: [Bug 1875517] Re: check_http inefficient and sometimes times out

On Thu, Apr 30, 2020 at 03:01:28PM -0000, Rafael David Tinoco wrote:
> I need some clarification here. You have applied a temporary mitigation
> that improves check_http by not constantly freeing and allocating heap
> memory. You have indicated upstream patches (2 of them) dealing with the
> constant timeout for the checker.
>
> monitoring-plugins 2.2 version check_http SEEMs to be close to nagios-
> plugins 1.5 version.

Aren't the nagios-plugin packages deprecated in favor of
monitoring-plugins?

| $ apt-cache search nagios-plugins-basic
| nagios-plugins-basic - transitional dummy package

> The nagios-plugins you pointed out are backportable to release-2.2.0 of
> NAGIOS-PLUGINS package and not monitoring-plugins. Have you tested those
> ? Do you need nagios-plugins backport (of those 2 patches) to test and
> see if it mitigates your issue ?

I initially tried to apply the patches as is from upstream but it
didn't apply cleanly requiring various other things (ssl/utils, utils,
etc.). Ended up being way too large:

| https://launchpadlibrarian.net/477251813/monitoring-plugins_2.2-3ubuntu2haw4_2.2-3ubuntu2haw5.diff.gz

So took a step back and revisited the changes from upstream. The most
important bit being this:

| https://github.com/nagios-plugins/nagios-plugins/commit/2b38350d546ef9632ccd90e300eeaf6eda0ca32c#diff-458353164a55a2e140dfc531b6ac2c38L1131-R1150

So took that, applied it, and built a package with the diff being much
much smaller:

| https://launchpadlibrarian.net/477257299/monitoring-plugins_2.2-3ubuntu2_2.2-3ubuntu2haw5.diff.gz

The attached patch (9 lines) seems to be all that's required, has been
tested and is what we're currently running with to resolve the socket
timeout issues we have seen.