Skip to content

Instantly share code, notes, and snippets.

@jayjanssen
Created March 19, 2014 17:16
Show Gist options
  • Select an option

  • Save jayjanssen/9646544 to your computer and use it in GitHub Desktop.

Select an option

Save jayjanssen/9646544 to your computer and use it in GitHub Desktop.
Basic Keepalived and PXC setup
vrrp_script chk_pxc {
script "/usr/bin/clustercheck"
interval 1
}
vrrp_instance PXC {
state MASTER
interface eth1
virtual_router_id 51
priority 100
nopreempt
virtual_ipaddress {
192.168.70.100
}
track_script {
chk_pxc
}
notify_master "/bin/echo 'now master' > /tmp/keepalived.state"
notify_backup "/bin/echo 'now backup' > /tmp/keepalived.state"
notify_fault "/bin/echo 'now fault' > /tmp/keepalived.state"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment