HTTP Health check backend with HAProxy package via GET request
-
Hi all!
I need to configure the HTTP health check via GET requests on custom address for the backend. The backend has two servers. Each server has the same URL like http://servername:8080/monitoring/teststatus which return status code 500 or 200, which depends on internal checks on the server
I have two questions:
-
Can you explain or give me the example of how I should write the HTTP health check for backend via GET request with address http://servername:8080/monitoring/teststatus?
-
Can I configure the http health check (GET) for every server in the backend? On the web interface, I didn't find how to do it, because there is only one check for the common backend. Maybe I should do it in another way?
-
-
What do you mean with 'custom address' ?
haproxy itself will normally check all the servers with the same health-check.
These parameters should do it.?:- Method = GET
- Url = /monitoring/teststatus
Or perhaps you want to configure a 'port' option on the server to make it check on a different port than the regular traffic go's to? Could add that on the server-pass-thru option.
Or if you need something totally different, then perhaps you could investigate the agent-check..?
-
Hi, PiBa!
Or perhaps you want to configure a 'port' option on the server to make it check on a different port than the regular traffic >>go's to? Could add that on the server-pass-thru option.
This is exactly what I need! Thanks, it works for me with the server-pass-thru option :)