Bug 1480085 - nagios-plugins-http 2.2.1-4git breaks http result content check
nagios-plugins-http 2.2.1-4git breaks http result content check
Status: NEW
Product: Fedora EPEL
Classification: Fedora
Component: nagios-plugins (Show other bugs)
epel7
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Stephen John Smoogen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-10 02:18 EDT by Peter Bieringer
Modified: 2017-08-22 18:33 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2017-08-10 02:18:52 EDT
Description of problem:
After upgrade from 2.1.4 to 2.2.1-4git the http content check is broken

Version-Release number of selected component (if applicable):
nagios-plugins-http-2.2.1-4git.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. run check
/tmp/check_http-2.2.1 -H ipv4.bieringer.de -s ipv4.bieringer.de




Actual results:
 /tmp/check_http-2.2.1 -H ipv4.bieringer.de -s ipv4.bieringer.de
HTTP CRITICAL: HTTP/1.1 200 OK - string 'ipv4.bieringer.de' not found on 'http://ipv4.bieringer.de:80/' - 26089 bytes in 0,066 second response time |time=0,066241s;;;0,000000 size=26089B;;;0

no wonder, if used with -v:

...
<body>

<center>

<h1>
19ipv4.bieringer
HTTP OK: HTTP/1.1 200 OK - 26081 bytes in 0,065 second response time |time=0,065444s;;;0,000000 size=26081B;;;0

(oops: strange "19ipv4.bieringer")


Expected results:

/tmp/check_http-2.1.4 -H ipv4.bieringer.de -s ipv4.bieringer.de
HTTP OK: HTTP/1.1 200 OK - 26089 bytes in 0,067 second response time |time=0,067280s;;;0,000000 size=26089B;;;0

with -v it is seen that the whole HTML page is returned


Additional info:

as requested already: check_http (and potential others) need urgently a proper test framework during build


Because of the 5+ issues found with check_http in the short past during minor upgrades imho a major rewrite is necessary...
Comment 1 Sven 2017-08-15 07:47:26 EDT
I'm seeing a similar issue with string/regex matching in 2.2.1-4git, where it can't find a string after the first 1K or so of headers + content. 

In the example above, "<h1>ipv4.bieringer.de</h1>" is also just after the 1K mark.
Comment 2 Dan Pritts 2017-08-22 18:33:49 EDT
I just manually compiled 2.2.1 on RHEL6 and it doesn't have the problem. 

There are a lot of changes to check_http.c in the 4git patch file but it's not obvious which one is the culprit.

Note You need to log in before you can comment on or make changes to this bug.