cloudprober icon indicating copy to clipboard operation
cloudprober copied to clipboard

[Feature Request][Documentation] Example on how to use the HTTP probe with TLS/HTTPS/443

Open DenisBiondic opened this issue 4 years ago • 2 comments

I've searched quite a while on how to use HTTP probe when you want to probe 443 instead of 80. I managed to do so by specifying the 443 port, but then I get issues from the backend servers such as HTTP 400: the plain http request was sent to https port

If there is such documentation, can you point me to the right place? Even if it exists, is should be perhaps more prominent somewhere in the examples.

P.S. I've also found out that the cloudprober follows the redirect, so currently what we do is we probe the port 80, we get the 3xx redirect and then the 443 is probed, but I would like to prevent the extra redirect request on every probe...

DenisBiondic avatar Mar 12 '20 17:03 DenisBiondic

Sorry for the insufficient (not so user-friendly) documentation.

Probe config options can be derived from the protobuf fields. For example here is the config protobuf for the HTTP probe type: https://github.com/google/cloudprober/blob/master/probes/http/proto/config.proto

There are also some examples in the examples directory, though they are not easy to find too.

We'll try to improve the documentation, but for your particular use case, you need to configure 'protocol' as HTTPS:

probe {
  type: HTTP
  http_probe {
    protocol: HTTPS
    url: ...
    port: ..
  }
}

Hope this helps for now.

manugarg avatar Mar 13 '20 07:03 manugarg

thx! that was exactly what we were looking for :)

DenisBiondic avatar Mar 16 '20 07:03 DenisBiondic