Forum Discussion
uni
Altostratus
May 25, 2011iRule to act on external events
I have a customer who wishes to redirect requests to their site depending on the existence of a flag file within their site. I can create a cron job or external monitor to test for the existence of this file, but want suggestions as to how to refer to this within my iRule.
Is there some way to check for a local file, or environment variable, within a rule applied to a virtual?
There may be another way of achieving the above requirement. I am open to suggestions.
- David_Windeyer
Nimbostratus
You could put a health monitor on a dummy node that hits the file and then use LB::status to see if it is up. - Michael_Yates
Nimbostratus
You could configure a Custom Health Monitor. - uni
Altostratus
Posted By David Windeyer on 05/25/2011 02:38 AM - hoolio
Cirrostratus
I think Michael was suggesting that you create a pool and monitor without referencing the pool on a virtual server. This would allow you to monitor the pool member but not send any traffic to it. You could then check the state of the pool member using LB::status or of the pool using active_members: - uni
Altostratus
Brilliant. Thanks Michael and Hoolio.
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