Forum Discussion

Guangtian_33040's avatar
Guangtian_33040
Icon for Nimbostratus rankNimbostratus
May 21, 2007

Run external script when F5 change node selection with priority

Have there been any new solutions to the following question posted almost 3 years ago?

 

 

"Is it possible to write iRule to run external script when F5 change node selection with priority ?

 

 

I have a requirement to load balance two servers in Active/Standby mode using minimum active member and priority settings. When the primary server goes down and F5 direct traffic to secondary server, is it possible to write iRule to run an external script to do something (run remote script) ? Is there any event trigger that I can write such rules ?"

 

 

I have a very similar setup, and need to configure BigIP to execute a program on standby server when it becomes active. Other than the workaround suggested earlier using syslog facility, is there any other way to do this?

1 Reply

  • File system (and remote socket) access can cause possible halts if we allowed them in the packet processing. Determining when a server goes from inactive to active is a tricky task. You could write an iRule that kept track of what servers the connections are going to and if you see a new server that's different than the previous request issue a syslog message that could trigger a trap to cause an action. Other options are to modify the URI and payload for HTTP applications to send a first command request to the new server (to an application that does your initialization and then send the original request with an HTTP::retry (in 9.2).

     

     

    Another option is to use a monitoring application written with iControl running on your backend servers. If it detects that it's state is active, it can run the initialization locally.

     

     

    -Joe