check_http fails to present proxy credientials
Posted: Mon Mar 13, 2017 10:10 pm
Hello -
I'm having an issue getting check_http to work via an authenticated proxy when using the -S -j CONNECT flags.
Does anymore know if this is a supported configuration?
Appended is (anonymised) output showing success when using proxy + authentication + http url but failure when using proxy + authentication + https url
SUCCESS...
[root@myserver:/usr/local/libexec] ./check_http -I myproxy.mydomain.com -p 8080 -u http://www.google.co.nz/ -b myusername:mypassword -w 1 -c 5 -v GET http://www.google.co.nz/ HTTP/1.0
User-Agent: check_http/v2.2 (monitoring-plugins 2.2)
Connection: close
Proxy-Authorization: Basic bWRmYzM5OlBoYXRzazhAQEA=
http://myproxy.mydomain.com:8080http://www.google.co.nz/ is 11412 characters
STATUS: HTTP/1.1 200 OK
[Head and Content follow but removed from this post]
HTTP OK: HTTP/1.1 200 OK - 11412 bytes in 0.245 second response time |time=0.245205s;1.000000;5.000000;0.000000;10.000000 size=11412B;;;0
FAILURE...
[root@myserver:/usr/local/libexec] ./check_http -I myproxy.mydomain.com -p 8080 -S -j CONNECT -H http://www.google.co.nz -u / -b myusername:mypassword -w 1 -c 5 -v
Entering CONNECT tunnel mode with proxy myproxy.mydomain.com:8080 to dst http://www.google.co.nz:443
CONNECT http://www.google.co.nz:443 HTTP/1.1
User-Agent: check_http/v2.2 (monitoring-plugins 2.2)
Proxy-Connection: keep-alive
Host: http://www.google.co.nz
Receive response from proxy
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: NTLM
Proxy-Authenticate: BASIC realm="Please enter Username and Password"
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Proxy-Connection: close
Connection: close
Content-Length: 1274
[Proxy responds with it's "Not authenticated" HTML page but removed from this post]
CRITICAL - Cannot make SSL connection.
SSL initialized
It would seem that check_http fails to present proxy credentials when using the -S -j CONNECT flags
If I disable authentication on the proxy the -S -j CONNECT scenario works.
I'm having an issue getting check_http to work via an authenticated proxy when using the -S -j CONNECT flags.
Does anymore know if this is a supported configuration?
Appended is (anonymised) output showing success when using proxy + authentication + http url but failure when using proxy + authentication + https url
SUCCESS...
[root@myserver:/usr/local/libexec] ./check_http -I myproxy.mydomain.com -p 8080 -u http://www.google.co.nz/ -b myusername:mypassword -w 1 -c 5 -v GET http://www.google.co.nz/ HTTP/1.0
User-Agent: check_http/v2.2 (monitoring-plugins 2.2)
Connection: close
Proxy-Authorization: Basic bWRmYzM5OlBoYXRzazhAQEA=
http://myproxy.mydomain.com:8080http://www.google.co.nz/ is 11412 characters
STATUS: HTTP/1.1 200 OK
[Head and Content follow but removed from this post]
HTTP OK: HTTP/1.1 200 OK - 11412 bytes in 0.245 second response time |time=0.245205s;1.000000;5.000000;0.000000;10.000000 size=11412B;;;0
FAILURE...
[root@myserver:/usr/local/libexec] ./check_http -I myproxy.mydomain.com -p 8080 -S -j CONNECT -H http://www.google.co.nz -u / -b myusername:mypassword -w 1 -c 5 -v
Entering CONNECT tunnel mode with proxy myproxy.mydomain.com:8080 to dst http://www.google.co.nz:443
CONNECT http://www.google.co.nz:443 HTTP/1.1
User-Agent: check_http/v2.2 (monitoring-plugins 2.2)
Proxy-Connection: keep-alive
Host: http://www.google.co.nz
Receive response from proxy
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: NTLM
Proxy-Authenticate: BASIC realm="Please enter Username and Password"
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Proxy-Connection: close
Connection: close
Content-Length: 1274
[Proxy responds with it's "Not authenticated" HTML page but removed from this post]
CRITICAL - Cannot make SSL connection.
SSL initialized
It would seem that check_http fails to present proxy credentials when using the -S -j CONNECT flags
If I disable authentication on the proxy the -S -j CONNECT scenario works.