Hi, On Fri, Feb 03, Antonio Trujillo Carmona wrote: > All this go fine, but balanced A don't know state of virtual machine but > state of haproxy in server, due this if we stop VM1 and we see state in > balanced A we see VM is OK, that is because Balanced A see then state of > haproxy in server 1 not VM1 status. > > So my question: > In this scenarios: > |S1 [VM 1]| > |Hap------ | > |[balA (haproxy)]| | [VM 3]| > | keepalived |----- > |[balB (haproxy)]| |S2 2 [VM 2]| > |Hap------ > | [VM 4]| > How I can pass state of VM to haproxy in balanced A and B?.
If I undestand your question correctly you can use monitor-uri and monitor-fail on S1/S2 haproxy. And healthcheck the monitor-uri from balA/balB. (http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4-monitor-uri http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#nbsrv) So in S1/S2 haproxy: monitor-uri /healthcheck monitor-fail if { nbsrv(your_backend_name) lt 1 } And in balA/balB: option httpchk GET /healthcheck ... http-check expect status 200 (http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-option%20httpchk) -Jarno -- Jarno Huuskonen

