Haproxy advance health check using lua

Hi

is it possible to create a multistep health check in lua ? if yes can you please share a sample with me

thanks

Not sure about LUA exactly but HAProxy supports external health check scripts written in whatever language is available on the system so usually BASH/Perl/Python/Whatever.

https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#external-check

HAProxy passes some variables to be used by your script:

$1= VIP
$2= VIP_Port
$3= RIP
$4= RIP_Port

So you can use this info in your script.

1 Like

Sorry better link to the info here:

https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#external-check%20command

1 Like