Sorry for bumping this. If this has been answered some time ever before, please 
do not hesitate to direct me to link or docs.

I've found a clumsy way for doing this by checking the first location and 
writing the result to file ("echo 1 > ./test.txt")
After doing this I'm able to check the file and to checklocation number two. 
Maybe it's clumsy but I presume it will do the job. I have not tested it yet.

Bojan



________________________________
 From: Bojan Sukalo <[email protected]>
To: "[email protected]" <[email protected]> 
Sent: Thursday, November 8, 2012 1:54 AM
Subject: openvpn backup location using monit
 

Hello,

I'm trying to figure out is there a way to do this with monit.

check a.b.c.d with icmp echo
if it's not alive
check x.y.z.d with icmp echo
if it's alive
exec /etc/init.d/openvpn

Basically, this should be a check of primary openvpn server. If it's ok, leave 
it be and do nothing. On the other hand, if check to primary fails, check 
something on the internet to see if internet link is down on backup location. 
If that's not true, start openvpn.

So if [ (a.b.c.d is not alive) and (x.y.z.d is alive)] start openvpn.

Thank you all

BojanĀ 
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to