延續 簡單的 linux H.A 架構 這個主題,
Part I
http://xrcd2.blogspot.tw/2013/04/linux-ha-keepalived-linux-vrrp.html
Part II
http://xrcd2.blogspot.tw/2013/05/linux-ha-keepalived-linux-vrrp-part-ii.html
加入 notify shell
notify_master "/etc/keepalived/notify_master.sh" #變成 master 時執行的 shell
notify_backup "/etc/keepalived/notify_backup.sh" #變成 backup 時執行的 shell
notify_fault "/etc/keepalived/notify_fault.sh" #故障時執行的 shell
notify "/etc/keepalived/notify.sh" # 狀態轉換時執行的 shell
加入的位置如下:
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 1
priority 100
advert_int 3
smtp_alert
authentication {
auth_type PASS
auth_pass 1234
}
virtual_ipaddress {
192.168.1.1
}
notify_master "/etc/keepalived/notify_master.sh"
notify_backup "/etc/keepalived/notify_backup.sh"
track_script {
check_shell
chk_httpd
chk_http_port
chk_https_port
chk_8080_port
}
track_interface{
eth0
}
}
沒有留言:
張貼留言