I want to check a website, to access this I have to use our http proxy. Tecnicalls, the connection to proxy is done via http on port 80 and then after the CONNECT request, the ssl connection will be made. When I call the nagios plugin directly, it is working.
OMD[XXX]:~/lib/nagios/plugins$ ./check_http -I proxy.mycorp.local -p 80 -u https://website.mycorp.com --ssl -j CONNECT -H website.mycorp.com
HTTP OK: HTTP/1.1 200 OK - 840 bytes in 0.102 second response time |time=0.102258s;;;0.000000;10.000000 size=840B;;;0
But when I configure WATO, it does not work. I configured paramst to be even to the Nagius plugin. ANd after searching in the cmk check_http I think it should be like this. The params are the same, die -j CONNECT will be appended with the proxy setting.
yes, but calling the Nagios plugin works. So I wanted to call the cmk active check, but I dont know how. The cmk command doesnt do it and because of the imports and variable I cannot call the active check directly. I want to check that it calls the plugin with the right parameters.
I had a lot of issues configuring proxies in http_checks but I found out one (stupid) trick. Even though the get method is a default you need to tickle the box and let it with get, don’t ask me why but it worked.
Can you paste a print screen of your rule ? and omit confidential data ? I’m asking you this because right now I don’t have access to my instance.
Edit:
In order to test it via cli you can do the following.
Search for the check, you can use this to look for other checks you want to try #cmk -L | grep check_http
With the name of check, run this with your parameters: #cmk --checks=check_http <options>
Removed edit2 because the solution was to make Get method explicit.
Great, explicit setting http method to CONNECT did the trick, now it is working. I also realized why, the -j parameter is only appended by the check when doing certificate checks, not for hormal website checks. I will check this in current release (still on 1.5) and maybe raise an ticket.