With updating my CheckMK to 2.3 I found about the new httpv2 check. Some checks give an error invalid HTTP header parsed. I found out that it is due to the following CSP Response Header:
Commenting it out on the webserver solved the error, nevertheless I urge to find how I can fix the issue, so that those CSP headers are parsed correctly and don’t crash the check.
CMK version: CRE 2.3.0 OS version: Ubuntu Server 22.04
Thank you for your reply. My original check is check_mk_active-httpv2!--url https://redacted --method GET --auth-user demo --auth-pw-pwstore redacted/stored_passwords --status-code 200 --certificate-levels 40,20
Running this in the cmk shell with --auth-pw-plain the output of the following command
OMD[cmk]:~$ $HOME/lib/nagios/plugins/check_httpv2 --url https://redacted --method GET --auth-user redacted --auth-pw-plain redacted
Using curl with -u and --basic I get the expected response, but using it together with -sD I receive the html body of a 401, which I am not understanding atm - but seems to be a problem with the webserver config rather than the check plugin, amirite?
Thank you so far!
Hi folks,
if you are stumbling across the same error, I found out what was causing it.
Having an nginx configuration like the above one, where each CSP directive is separated by semicolon, additional linebreaks and whitespaces, does not work well with the check_httpv2 plugin - and is furthermore discouraged as the proper syntax would be
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.