I have 2 HA Proxy servers with Keepalived configured with them, and have 2 backend servers to which traffic is routed by HA Proxy, am writing a shell script that will sync a directory between backend servers based on which server is currently set as active using osync (I dont want activity status about the HA Proxy servers but the backend servers) (HA is configured as Active-Passive, switches to available server when current one goes down). The problem is I cannot find any resource or way that could programmatically tell me which server is currently actively accepting traffic.
Asked
Active
Viewed 62 times
1
-
I think you can get it through keepalived log itself or you can write endpoint to show you active ip. – asktyagi Nov 03 '22 at 10:36
-
@asktyagi can you elaborate a bit more ? – MoonLight Nov 03 '22 at 10:52