! Configuration File for keepalivedglobal_defs { notification_email { xaioqiang.he@xinboxinmo.com } notification_email_from h_find@sina.com smtp_server 192.168.200.1 smtp_connect_timeout 30 router_id keepalived1 vrrp_skip_check_adv_addr #vrrp_strict 如果在ping不通的情况下 要注释这条 vrrp_garp_interval 0 vrrp_gna_interval 0}vrrp_script chk_nginx { script "killall -0 nginx" interval 2 weight -20}vrrp_instance VI_1 { state MASTER interface ens33 virtual_router_id 51 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 1114 } virtual_ipaddress { 192.168.132.16/32 dev ens33 label ens33:0 } track_script { chk_nginx }}vrrp_instance VI_2 { state BACKUP interface ens33 virtual_router_id 59 priority 98 advert_int 1 authentication { auth_type PASS auth_pass 2224 } virtual_ipaddress { 192.168.132.17/32 dev ens33 label ens33:1 } track_script { chk_nginx }}