# http://www.keepalived.org/doc/configuration_synopsis.html global_defs { no_email_faults vrrp_no_swap } # Master vrrp_script chk_dienst_ma { script "/root/bin/check_db.sh $(hostname -s) 3306 checkuser geheimes-passwort" # MySQL-DB prüfen interval 2 weight 2 fall 2 rise 2 } vrrp_instance MAIP_3306 { interface bond0.24 state BACKUP virtual_router_id 101 priority 97 advert_int 1 track_script { chk_dienst_ma } authentication { auth_type PASS auth_pass geheimes-passwort } virtual_ipaddress { 10.10.2.20 } unicast_src_ip 10.10.2.22 unicast_peer { 10.10.2.21 #10.10.2.22 10.10.2.23 } notify "/usr/local/bin/notify_Instance_MAIP_3306.sh" } # # Backup vrrp_script chk_dienst_bu { script "/root/bin/check_db.sh $(hostname -s) 3306 checkuser geheimes-passwort" # MySQL-DB prüfen interval 2 weight 2 fall 2 rise 2 } vrrp_instance BUIP_3306 { interface bond0.24 state BACKUP virtual_router_id 102 priority 3 advert_int 2 track_script { chk_dienst_bu } authentication { auth_type PASS auth_pass geheimes-passwort } virtual_ipaddress { 10.10.2.24 } unicast_src_ip 10.10.2.22 unicast_peer { 10.10.2.21 #10.10.2.22 10.10.2.23 } notify "/usr/local/bin/notify_Instance_BUIP_3306.sh" }