query keepalived
Posted
by
tdimmig
on Server Fault
See other posts from Server Fault
or by tdimmig
Published on 2012-11-28T22:31:05Z
Indexed on
2012/11/28
23:05 UTC
Read the original article
Hit count: 198
linux
|keepalived
*Note: I have trouble deciding what should go in serverfault and what should go in superuser, if some kindly admin decides this is in the wrong place please move it for me - many thanks.
I am implementing a basic HA system with keepalived. I only want to be notified of the failover in the case of hardware failure.
I do, however, have the servers switch roles periodically. I have a track_script running on the backup that will vary it's return between 0 and 1 on an interval (once a week, once a month, whatever). Upon returning 0, the priority is raised above that of the master, upon returning 1 the priority is lowered again. This way they trade places on the configured interval.
The question: What can I do to tell the difference between a switch caused by my script, and a switch caused because one of the servers died? I certainly want to be notified when there is an actual problem, but not every time the servers change places because of the script.
I see that version 1.2.7 has snmp support and I may be able to use it to get some information that could tell me one way or another, but to be honest I've never used snmp before and I don't know how to get the information I want with it (my Google foo failed me).
© Server Fault or respective owner