How to correctly configure the load balance monitor?

I set up a default monitor as per the tutorial:

But only first server is health:

The server 2, with same monitor - “Unspecified error”.

I’ve tried several other settings, like http port 80, no redirect, subdomain or other path or with header, but the others don’t work on any of the servers, only https 443 insecure redirect work for 1 server, but I dont know if this is right (better solution).

I paid for the Cloudflare load balancer but I think the monthly fee will expire and I still won’t be able to use it, as it doesn’t have support.

Sorry, thank you for any help.

My others research and try:

https://api.cloudflare.com/#account-load-balancer-monitors-create-monitor

https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/load_balancer_monitor#example-usage

The best way to break this type of problem down is to use a tool like cURL to emulate your healthcheck direct to your origin:

curl -svo /dev/null https://example.com --connect-to ::1.2.3.4

Replace example.com with your Load Balancer hostname and 1.2.3.4 with the IP of the origin server that is failing.

If you don’t see the expected HTTP status 200 - that will be your issue. Note it’s recommended to define a Host header in your health check - often this can be the source of health checks failing if your origin expects a particular host header (e.g. not the same hostname as the load balancer).

1 Like

Thank you very much @simon
Solved!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.