1

I have used keepalived to archive high availability for nginx. I set initial priority 101 for MASTER, 100 for BACKUP and I can see /var/log/messages :

Keepalived_vrrp[34483]: VRRP_Script(chk_nginx) failed
Keepalived_vrrp[34483]: VRRP_Instance(VI_1) Received higher prio advert
Keepalived_vrrp[34483]: VRRP_Instance(VI_1) Entering BACKUP STATE
Keepalived_vrrp[34483]: VRRP_Instance(VI_1) removing protocol VIPs

Is there any way to see the changed priority number to look into why my machine change role state?

vrrp_script chk_nginx {
   script "killall -0 nginx"
   interval 1
   weight -2
   fall 2
   rise 1
}

1 Answer 1

1

You can use tcpdump to see the advertisements on the wire. This will show you the source machine sending the advertisement that's higher.

tcpdump -vvv -n -i eth0 host 224.0.0.18
3
  • No other way to write detail log to /var/log/messages?
    – seanlook
    Jun 5, 2015 at 3:09
  • You can add a '-D' daemon option in your startup script.
    – xeon
    Jun 5, 2015 at 3:14
  • tcpdump -vvv -n -i eth0 dst 224.0.0.18 and src 172.29.88.224 shows me the priority. Thanks!
    – seanlook
    Jun 5, 2015 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .