Forum Discussion
2cushty_206
Nimbostratus
Jul 09, 2010irule trigger external script
Hi,
I'm looking for a way to initiate a script on an external server from within the irule logic. I know this can be done via monitors but I want to do it under the control of an irule? I guess this could be an external script on the F5 or even a crafted HTTP request within the irule prehaps? What's options are there?
Thanks
Phillipe
8 Replies
Sort By
- Chris_Miller
Altostratus
If you're hell-bent on using an iRule, I'd probably configure one that did indeed send an HTTP request for the script. - 2cushty_206
Nimbostratus
the logic would only kick during failure of all pool members, but initiating it from irule will be the tricky part as the event may not be traffic originated i.e. I probably could not use the HTTP::retry method I've seen described previously to alter the client request and trigger a request to the server hosting the script as the event is triggered by failure of all pool members - hoolio
Cirrostratus
Can you elaborate on what you're trying to accomplish and the overall scenario? Maybe we can provide you with some additional options with more info. - 2cushty_206
Nimbostratus
sure, basically we have production servers in a pool that take all traffic normally, we also have some 'hot standby' servers/site that are normally down that will kick in if there is a major failure of all members of the production pool. The services in the standby cluster have some backend components that need to be brought online before traffic flows and the apps are up. The trigger for bringing them online is the failure of all members of the production environment, so I was thinking the F5 would trigger the event to fire a script on the standby cluster to bring the backend systems into play when all members are down in production, after which time the monitors on the standby cluster would come up and traffic would flow to the standby cluster. - juan_salinas_47
Nimbostratus
hi 2cushty, - hoolio
Cirrostratus
Juan, I like this idea. Just make sure that only a valid user could ever generate such a log message. Else, you could allow a malicious user to trigger the script illegitimately. You could reduce this risk by checking the rule name and log message in the syslog-ng match statement. - 2cushty_206
Nimbostratus
thanks for the info guys, the logging solution sounds similar to one I've seen elsewhere on the forum where you can filter out from syslog-ng but using the user_alert.conf and add the script in there, it's an option but I didn't really want to drop out of the irule logic - juan_salinas_47
Nimbostratus
2cushty,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects