Forum Discussion

Manuel_Cristoba's avatar
Manuel_Cristoba
Icon for Nimbostratus rankNimbostratus
Mar 21, 2012

script to collect and compare default gateway value

hi there,

 

 

I need to develop an script that will force an Active Viprion to bcome Standby when the default gateway of the Standby unit changes.

 

 

so here is what i think:

 

 

the HA group will be tied to a pool that has one member ( standby ip)

 

this pool is monitored by a script.

 

the script will logon to the standby via ssh and excute the following:

 

 

tmsh show net route default | grep "default" | awk '{print $3}'

 

 

the output is the default gateway ip....199.199.199.199 for example.

 

 

if that ip changes to anything else, then the script will place the pool down and therfeore the HA group will produce a ail event promoting the standby to active.

 

 

the question is..

 

 

I need help with the development of the script..

 

 

 

any help will be appreciated..

 

 

also, please feel free to advise if there is a simpler way...

 

 

failsafe gateway will not help me ( in the Active) since a change of the active's gateway is not what i need to track.

 

 

thanks

 

MM

 

 

 

 

 

 

 

No RepliesBe the first to reply