check_http problem with chunked encoding in v2.1.1

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

check_http problem with chunked encoding in v2.1.1

Postby frank_brandt » Sat Sep 05, 2015 1:02 pm

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
Last edited by dwhitfield on Mon Jan 16, 2017 10:24 am, edited 1 time in total.
Reason: marking with green check mark
frank_brandt
 
Posts: 3
Joined: Sat Sep 05, 2015 12:42 pm

Re: check_http problem with chunked encoding in v2.1.1

Postby tmcdonald » Tue Sep 08, 2015 11:13 am

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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Support Lead / Operations Engineer
 
Posts: 8618
Joined: Mon Sep 23, 2013 8:40 am

Re: check_http problem with chunked encoding in v2.1.1

Postby frank_brandt » Thu Sep 10, 2015 10:44 am

Hi,

would be great if you could link the issue.

Best Regards,
Frank
frank_brandt
 
Posts: 3
Joined: Sat Sep 05, 2015 12:42 pm

Re: check_http problem with chunked encoding in v2.1.1

Postby lmiltchev » Thu Sep 10, 2015 2:53 pm

Frank, I posted your comments on the Nagios Plugins Github page:

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

Thanks for reporting this!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 9431
Joined: Mon May 23, 2011 12:15 pm

Re: check_http problem with chunked encoding in v2.1.1

Postby jfrickson » Tue Nov 01, 2016 3:51 pm

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.
Former Nagios Employee
jfrickson
Developer
 
Posts: 188
Joined: Wed Jul 22, 2015 9:58 am

Re: check_http problem with chunked encoding in v2.1.1

Postby frank_brandt » Sun Jan 15, 2017 12:38 pm

Hi jfrickson,

the fix is working. Thanks...
frank_brandt
 
Posts: 3
Joined: Sat Sep 05, 2015 12:42 pm

Re: check_http problem with chunked encoding in v2.1.1

Postby dwhitfield » Mon Jan 16, 2017 10:24 am

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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3486
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC


Return to Nagios Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest