-
-
Save makeittotop/c232cf25b25504a427f5b23e1a6e31af to your computer and use it in GitHub Desktop.
keepalived configuration for tracking redis master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vrrp_script chk_redis_master { | |
script "redis-cli info replication | grep -q 'role:master'" | |
interval 2 | |
weight 2 | |
rise 2 | |
fall 2 | |
} | |
vrrp_instance redis_vip { | |
interface eth0 | |
state BACKUP | |
virtual_router_id 49 | |
priority 100 | |
authentication { | |
auth_type PASS | |
auth_pass changeme | |
} | |
virtual_ipaddress { | |
10.2.3.49/24 brd 10.2.3.255 dev eth0 | |
} | |
track_script { | |
chk_redis_master | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment