Hi tech, I've been using ifstated for years now for failover my links and I've developed quite some tools on top of it. But, I've recently reached a cornerstone. I've developed a series of scripts that are called with the run argument on the init of each state that perform a series of tasks. One of these tasks is to write to a database (currently sqlite) and based on the last state changes, perform different actions. But, since I can't talk directly to the ifstated daemon, I have a delay since I can affect any state change on it.
So, I've been planning on improving ifstated itself, for it to be able to keep track of state changes and the time they happened, so it can be able to improve it's decision making capabilities in the sense that it can perform state changes based on previous states changes. Not just on external commands results or interface statuses. You could say something like this: set-state X if ! previous_state Y More to that, it could be also based on a more simplistic approach, using counters. With the possibility of zeroing the counters from ifstated.conf based on conditions. Or both, time and counters. So one could change to a different state if one of the links is flapping between states. I know this makes it not a pure machine state, but I believe that the improvements can be worth the change. What you guys think? Cheers, -- Giancarlo Razzolini GPG: 4096R/77B981BC