Keepalive配置文件说明和实现高可用(3)

! Configuration File for keepalived
global_defs {
    router_id teacher
}
vrrp_script chk_haproxy {
    script "lsof -i:80 | grep haproxy || exit 1"
    interval 2
    fail 1
}
vrrp_instance lvs_inst {
  state MASTER
  interface ens33
      virtual_router_id 51
      priority 250
      nopreempt
      advert_int 1
authentication {
            auth_type PASS
            auth_pass 1111
}
track_script {
          chk_haproxy
}
virtual_ipaddress {
          10.18.42.124
          }
}

本���永久更新链接地址https://www.linuxidc.com/Linux/2018-05/152149.htm

linux

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/b0908200b5c2dacfbba141cfe0f73f37.html