在/etc/keepalived/keepalived.conf中配置如下:
vrrp_script chk_http_port { script "/usr/bin/bash -c '</dev/tcp/127.0.0.1/8888'" interval 2 weight -5 fall 2 rise 1 }
在/etc/keepalived/keepalived.conf中配置如下:
vrrp_script chk_http_port { script "/usr/bin/bash -c '</dev/tcp/127.0.0.1/8888'" interval 2 weight -5 fall 2 rise 1 }