Page 1 of 1

check_http problem with chunked encoding in v2.1.1

Posted: Sat Sep 05, 2015 1:02 pm
by frank_brandt
Hi,

I can see in release notes of v2.1.0 there were some changes in check_http regarding chunked encoding but text is broken with v2.1.1. The server is running WebSphere Application Server with a simple servlet that checks availability of an application and returns a few lines (no HTML). I had to obfuscate some information so the 0084 length info from v2.0.3 does not fit with the real length anymore but you can see that status and duration strings in the content is broken with v2.1.1

Best Regards,
Frank

/usr/share/nagios-plugins-2.0.3/libexec/check_http -H xxx -p 8443 -u /xxx-alivecheck/xxxam -R "status.*OK" -S -J /usr/share/nagios-plugins/libexec/xxx.pem -K /usr/share/nagios-plugins/libexec/xxx.key -v
GET /xxx-alivecheck/xxxam HTTP/1.1
User-Agent: check_http/v2.0.3 (nagios-plugins 2.0.3)
Connection: close
Host: xxx:8443
Accept: */*


https://xxx:8443/xxx-alivecheck/xxxam is 332 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Connection: close
Date: Sat, 05 Sep 2015 17:55:17 GMT
Transfer-Encoding: chunked
Content-Type: text/plain; charset=ISO-8859-1
X-Powered-By: Servlet/3.0 JSP/2.2
**** CONTENT ****
0084
status=OK
duration=20 ms
version=3.0.4
time=2015-09-05_19:55:17
hostname=xxx


0000


HTTP OK: HTTP/1.1 200 OK - 332 bytes in 0.144 second response time |time=0.144261s;;;0.000000 size=332B;;;0



===================================

/usr/share/nagios-plugins/libexec/check_http -H xxx -p 8443 -u /xxx-alivecheck/xxxam -R "status.*OK" -S -J /usr/share/nagios-plugins/libexec/xxx.pem -K /usr/share/nagios-plugins/libexec/xxx.key -v
GET /xxx-alivecheck/xxxam HTTP/1.1
User-Agent: check_http/v2.1.1 (nagios-plugins 2.1.1)
Connection: close
Host: xxx:8443
Accept: */*


https://xxx:8443/xxx-alivecheck/xxxam is 332 characters
STATUS: HTTP/1.1 200 OK
**** HEADER ****
Connection: close
Date: Sat, 05 Sep 2015 17:54:48 GMT
Transfer-Encoding: chunked
Content-Type: text/plain; charset=ISO-8859-1
X-Powered-By: Servlet/3.0 JSP/2.2

**** CONTENT ****
stK
duratiduration=24 ms
version=3.0.4
time=2015-09-05_19:54:48
hostname=xxx


HTTP CRITICAL: HTTP/1.1 200 OK - pattern not found - 332 bytes in 0.157 second response time |time=0.156843s;;;0.000000 size=332B;;;0

Re: check_http problem with chunked encoding in v2.1.1

Posted: Tue Sep 08, 2015 11:13 am
by tmcdonald
Thanks for the report!

If you have a Github account, the best place to file this would be on the Nagios Plugins Github page: https://github.com/nagios-plugins/nagios-plugins/

Otherwise I would be happy to link the issue for you.

Re: check_http problem with chunked encoding in v2.1.1

Posted: Thu Sep 10, 2015 10:44 am
by frank_brandt
Hi,

would be great if you could link the issue.

Best Regards,
Frank

Re: check_http problem with chunked encoding in v2.1.1

Posted: Thu Sep 10, 2015 2:53 pm
by lmiltchev
Frank, I posted your comments on the Nagios Plugins Github page:

https://github.com/nagios-plugins/nagio ... issues/103

Thanks for reporting this!

Re: check_http problem with chunked encoding in v2.1.1

Posted: Tue Nov 01, 2016 3:51 pm
by jfrickson
Frank,

There's a possible fix in the 'maint' branch of nagios plugins (https://github.com/nagios-plugins/nagio ... int.tar.gz). Please give it a test and see if it works for you.

Re: check_http problem with chunked encoding in v2.1.1

Posted: Sun Jan 15, 2017 12:38 pm
by frank_brandt
Hi jfrickson,

the fix is working. Thanks...

Re: check_http problem with chunked encoding in v2.1.1

Posted: Mon Jan 16, 2017 10:24 am
by dwhitfield
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!