Test health check

Hi All,

I want to test http health check using curl command for a backend which is configured as shown below:


backend nova_console-back
mode http
balance source
timeout server 60m
stick store-request src
stick-table type ip size 256k expire 30m
option forwardfor
option httpchk HEAD /spice_auto.html HTTP/1.0\r\nUser-agent:\ osa-haproxy-healthcheck
http-check expect status 200

server  nova_api_container-b1980ef9 10.50.22.228:6082 check port 6082 inter 12000 rise 3 fall 3
server  nova_api_container-9dd04794 10.50.22.239:6082 check port 6082 inter 12000 rise 3 fall 3
server  nova_api_container-7535c235 10.50.21.121:6082 check port 6082 inter 12000 rise 3 fall 3

How do I test the health check line shown below using a curl command ?

option httpchk HEAD /spice_auto.html HTTP/1.0\r\nUser-agent:\ osa-haproxy-healthcheck

I need the complete syntax. Please help me …

Thanks

I believe you’re looking for the curl man page, specifically for: