check_http problem with chunked encoding in v2.1.1
Posted: 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
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