keepalived vrrp_script的一些实例配置
2015-03-09 12:04
369 查看
转自:http://www.lvtao.net/tool/keepalived-vrrp_script.html
vrrp_script chk_sshd { script "killall -0 sshd" # cheaper than pidof interval 2 # check every 2 seconds weight -4 # default prio: -4 if KO } vrrp_script chk_haproxy { script "killall -0 haproxy" # cheaper than pidof interval 2 # check every 2 seconds } vrrp_script chk_http_port { script "</dev/tcp/127.0.0.1/80" # connects and exits interval 1 # check every second weight -2 # default prio: -2 if connect fails } vrrp_script chk_https_port { script "</dev/tcp/127.0.0.1/443" interval 1 weight -2 } vrrp_script chk_smtp_port { script "</dev/tcp/127.0.0.1/25" interval 1 weight -2 } vrrp_instance VI_1 { interface eth0 state MASTER virtual_router_id 51 priority 100 virtual_ipaddress { 192.168.200.18/25 } track_interface { eth1 weight 2 # prio = +2 if UP eth2 weight -2 # prio = -2 if DOWN eth3 # no weight, fault if down } track_script { chk_sshd # use default weight from the script chk_haproxy weight 2 # +2 if process is present chk_http_port chk_https_port chk_smtp_port } } vrrp_instance VI_2 { interface eth1 state MASTER virtual_router_id 52 priority 100 virtual_ipaddress { 192.168.201.18/26 } track_interface { eth0 weight 2 # prio = +2 if UP eth2 weight -2 # prio = -2 if DOWN eth3 # no weight, fault if down } track_script { chk_haproxy weight 2 chk_http_port chk_https_port chk_smtp_port } }
相关文章推荐
- 交换机 vrrp+mstp配置实例
- 中小型网络完全配置实例(VRRP_MSTP)
- 热备份路由协议中思科HSRP与华为VRRP的配置实例及区别
- keepalived DROP vrrp与配置文件详解
- 实例配置keepalived+lvs+nginx
- VRRP技术实例(某市级单位核心交换机VRRP配置)
- keepalived 高可用配置实例
- 一个简单的http HA集群 keepalived实例配置
- 实例:LVS+Keepalived配置LVS的高可用
- Haproxy+Keepalived集群实例配置
- H3C 7503 和 7502 MSTP+VRRP配置实例
- 实战锐捷【综合实例】MSTP+VRRP+路由重发布 配置实验
- haproxy+keepalived实现高可用负载均衡(实例配置)
- 一个简单http集群keepalived实例配置,系统参数优化及解释
- Samsung x210 Android makefile 的一些配置实例问题
- 通过访问控制列表DENY掉一些危害端口配置实例 access-list
- VRRP配置及多备份VRRP配置实例
- 基于keepalived、redis sentinel的多实例redis集群【2】---realserver配置
- 一次keepalived安装配置实例
- Keepalived之vrrp_script方式检测(mycat)