! Configuration File for keepalived global_defs { router_id [ROUTER_ID] } vrrp_script check_bumpup { script "[RROUTER_BIN_PATH]/check_bumpup.sh" interval 5 weight [DELTA] } vrrp_script heartbeat { script "[RROUTER_BIN_PATH]/heartbeat.sh" interval 10 } vrrp_instance inside_network { state BACKUP interface eth0 virtual_router_id 51 priority [PRIORITY] advert_int 1 authentication { auth_type PASS auth_pass WORD } virtual_ipaddress { [ROUTER_IP] brd [BOARDCAST] dev eth0 } track_script { check_bumpup heartbeat } #nopreempt # notify scripts and alerts are optional # # filenames of scripts to run on transitions # can be unquoted (if just filename) # or quoted (if has parameters) # to MASTER transition notify_master "[RROUTER_BIN_PATH]/master.sh" # to BACKUP transition notify_backup "[RROUTER_BIN_PATH]/backup.sh" # FAULT transition notify_fault "[RROUTER_BIN_PATH]/fault.sh" # for ANY state transition. # "notify" script is called AFTER the # notify_* script(s) and is executed # with 3 arguments provided by keepalived # (ie don't include parameters in the notify line). # arguments # $1 = "GROUP"|"INSTANCE" # $2 = name of group or instance # $3 = target state of transition # ("MASTER"|"BACKUP"|"FAULT") #notify [RROUTER_BIN_PATH]/notify.sh }