keepalived配置文件

! Configuration File for keepalived

global_defs {
notification_email {
acassen@firewall.loc
failover@firewall.loc
sysadmin@firewall.loc
}
notification_email_from coin@firewall.loc
smtp_server 192.168.200.1
smtp_connect_timeout 1
router_id LVS_DEVEL_9
vrrp_skip_check_adv_addr
vrrp_strict
vrrp_garp_interval 0
vrrp_gna_interval 0
}

vrrp_script chk_http_port {
script "/data/script/nginx.sh" #监控服务脚步
interval 2 #检测时间间隔(执行脚步间隔)
weight 2
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}

track_script {                      #以脚本为监控chk_http_port是前面填写的
    chk_http_port
}

virtual_ipaddress {
    10.202.40.150
}

}


扫描二维码,在手机上阅读!

标签: none

添加新评论