IPSec VPN fail-over

Current setup is no fail over. I’ve tried adding both connections before now, and predictably only one VPN connection works for connecting with the other sitting (and appearing to be) disabled.
We also have a watchdog that pings an internal address (192.168..) that’s visible by the VPN IP Range (10...*).

Let me know if you need me to add a copy of our current setup.

Is it possible to set up fail over so it pings approx 3-4 times to bring up the primary IPSec but if that fails to connect it then does the same to the secondary connection, disabling the first, and THEN runs the watchdog if neither ping correctly?

Alternately, is it possible to set a constant ping going (possibly via script) that will run every 5 minutes, then cancel, wait for 5 and run again?

Anything to keep our damned IPSec tunnels up!