You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes check_http goes into CRITICAL state when Transfer-Encoding: chunked is used. Then the check fails for a couple of minutes.
We have spent some time with debugging but the response we get from the webserver is always complete. If we choose another string to check the content the check is fine again. So it looks like check_http has a problem with reassembling the chunked response.
We are using nagios-plugins-http-2.2.1-4git.el7.x86_64 on CentOS Linux release 7.4.1708 (Core).
The used command is as followed (anonymized):
check_http -H "www.example.com" -I "192.168.90.107" -c 20 -e 200 -k "https:true" -p 8810 -s "Realisiert mit dem Government Site Builder" -u /Webs/Example/DE/Startseite/startseite_node.html -w 10
The flapping check output looks like this:
HTTP OK: Status line output matched "200" - HTTP/1.1 200 OK - 60925 bytes in 0.005 second response time |time=0.005078s;10.000000;20.000000;0.000000 size=60925B;;;0
HTTP CRITICAL: Status line output matched "200" - HTTP/1.1 200 OK - string 'Realisiert mit dem Governm...' not found on 'http://www.example.com:8810/Webs/Example/DE/Startseite/startseite_node.html' - 71720 bytes in 0.090 second response time |time=0.089791s;10.000000;20.000000;0.000000 size=71720B;;;0
Here you can find two straces that also show the problem:
If a chunk end is within the search string the check will fail because of the hex size information in the response.
One workaround is to use HTTP 1.0 by connecting to the Server using -I and providing the hostname as a -k "host: www.mydomain.com". HTTP 1.0 doesn't support chunks. Because of a bug in the header handling code in check_http it is necessary not to write "Host:". Using "HOST:" or "host:" is ok.
Sometimes check_http goes into CRITICAL state when Transfer-Encoding: chunked is used. Then the check fails for a couple of minutes.
We have spent some time with debugging but the response we get from the webserver is always complete. If we choose another string to check the content the check is fine again. So it looks like check_http has a problem with reassembling the chunked response.
We are using nagios-plugins-http-2.2.1-4git.el7.x86_64 on CentOS Linux release 7.4.1708 (Core).
The used command is as followed (anonymized):
check_http -H "www.example.com" -I "192.168.90.107" -c 20 -e 200 -k "https:true" -p 8810 -s "Realisiert mit dem Government Site Builder" -u /Webs/Example/DE/Startseite/startseite_node.html -w 10
The flapping check output looks like this:
HTTP OK: Status line output matched "200" - HTTP/1.1 200 OK - 60925 bytes in 0.005 second response time |time=0.005078s;10.000000;20.000000;0.000000 size=60925B;;;0
HTTP CRITICAL: Status line output matched "200" - HTTP/1.1 200 OK - string 'Realisiert mit dem Governm...' not found on 'http://www.example.com:8810/Webs/Example/DE/Startseite/startseite_node.html' - 71720 bytes in 0.090 second response time |time=0.089791s;10.000000;20.000000;0.000000 size=71720B;;;0
Here you can find two straces that also show the problem:
strace-check_http-s407-8810.gz
strace-check_http-s409-8810.gz
The string is read in the server reply in strace:
"<!--Realisiert mit dem Government Site Builder"
But it still outputs:
write(1, "HTTP CRITICAL: Status line output matched "200" - HTTP/1.1 200 OK - string 'Realisiert mit dem Governm...' not found on 'http://www.example.com:8810/Webs/Example/DE/Startseite/startseite_node.html'
If you need further information, logs or anything else let me know.
Regards, Christian
The text was updated successfully, but these errors were encountered: