目前我正在使用HAproxy来检查一个SMTP服务器与以下内容:
option tcp-check tcp-check expect rstring ^220 tcp-check send QUIT\r\n tcp-check expect rstring ^221
但是,是否也可以添加另一个检查相同的服务? 这其他检查将在端口80上,并且是一个简单的检查,看看IPHERE:80 / mhtest是否会返回string“GOOD”
如果任何一个检查返回一个错误,我希望我的服务改变到我有的备份
server node1 192.168.0.1:25 check-send-proxy check inter 15s send-proxy server node2 192.168.0.2:25 check-send-proxy check inter 15s send-proxy backup
是的,只需使用外部健康检查即:
external-check path "/usr/bin:/bin" external-check command /bin/true server s1 10.0.0.3:4444 check