I just set up the notification script in /etc/keepalived/keepalived.conf
/etc/keepalived/keepalived.conf
global_defs {
notification_email {
admin@example.com
}
notification_email_from keepalived@example.com
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id DEFAULT_ROUT_ID
}
vrrp_script notification {
script ""
interval
weight
}
vrrp_instance VI_1 {
interface eth0
virtual_router_id 10
nopreempt
state backup
priority 110
advert_int 1
virtual_ipaddress {
22.22.22.22
}
track_script {
notification
}
notify_master "/etc/keepalived/master.sh"
notify_backup "/etc/keepalived/backup.sh"
}
And Whenever the state changes, it comes out
It seems working but those shellscripts are not executed.
Do you have any suggestion?