Hi, I'm using an http-check expect string to test the presence of a certain string in the body response. Like this
option httpchk GET /mycheck HTTP/1.1\r\nHost:\ myhost.xx\r\nConnection:\ close http-check expect ! string "healthStatus":"Unhealthy" When the backend is not accessible, our nginx returns a default page, with a 5XX return code. In this case (return code != 200), it should be considered as an error, and the associated serveur should be removed from the server. It's not the case : HAProxy only check the string, and says it's OK. Question : How to check the string AND check the return code ? I want my server to be removed if string is absent OR if return code is != 200 ! Thank you, Sébastien Rohaut