Forum Discussion
Node Status change to trigger Script
Hope someone can help me with this. I'm currently using GTM Version 10.2.1 and I have a wideIP setup with a pool that has two members. Member 1 is set to Priority 3 and Member 2 is set to Priority 1. Whenever the status of one of these members changes, I would like a script to run. Normally with Tcl I would use either open or exec but they're both on the Disabled list. So how do I run a script that's located at /var/scripts/
So far this is what I have for my iRULE
when LB_SELECTED {
if { [LB::status] eq "up" or "down"}{
}
}
Any and all help on this would be extremely gratefully appreciated.
Thanks
Sam
- Joel_MosesNimbostratusI don't think you want to do this with iRules. First, they are transactional and event-based, so using them as a warning trigger is difficult at best. Second, unless you want to do it via event logging or HTTP::retry, there is no real way to jump outside the iRule sandbox to execute something.
- lostnytechie_55NimbostratusJoel,
- Joel_MosesNimbostratusWell, in the TMSH script I'm referencing, there's no Cron job -- and it does not do exactly what you're wanting, it's just an example of how to do a "watch loop" in TMSH. There's a delay in the script using a preset interval and "after" which will release the while loop every two seconds.
set interval 2 set delay [expr $interval * 1000] ... after $delay
- hooleylistCirrostratusYou could potentially implement this type of logic by calling a custom script from the user_alert.conf file when a member is marked down. See this post for details:
- lostnytechie_55NimbostratusI used user_alert.conf to trigger an external script. It was the simplest and easiest solution once i figured out how it works.
- Ed_Hammond_2611NimbostratusSee http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/44/aft/1178752/showtab/groupforums/Default.aspx
Recent Discussions
Related Content
* 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