-
-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can keepalived(nopreempt) proactively give up the VIP when the Master is not faulty and then turn it into a backup? #2552
Comments
It doesn't work quite as you describe it but there are probably ways of achieving what you want. When you state "to detect my application service", I assume you mean that the process stops running. If that is the case, then you want to use a If you have to use preempt, then the only way that the backup can take over as master is if the original master goes to fault state (that is what preempt means). You can make this happen if the track_process has a weight of 0. There are options such as a |
I get it, Thank you very much. How to monitor keepalived status switching information if I don't have a smtp server? Can I push keepalived log information out automatically? |
You can use notify scripts. Either just a simple notify script which will be called every time the vrrp instance changes state, or the separate notify_master, notify_backup, notify_fault scripts. There is an alternative option of using a notify_fifo. The details are all in the keepalived.conf(5) man page. |
|
I don't know what you mean by "pushing out the syslog of keepalived", and I can't see why you would want to monitor the syslog when there are already ways of receiving notification of vrrp instance state changes, as I set out above and you are apparently aware of. keepalived currently logs, via syslog, vrrp instance state changes. Is there anything more that your need keepalived to do? If for some reason the keepalived syslog entries are insufficient for you, you could use a notify script to write syslog entries. |
I have a scenario where I need to use Keepalived(nopreempt) to detect my application service. When my application service goes down, I need to actively give up the VIP and change the state from Master to Backup.
The text was updated successfully, but these errors were encountered: