Forum Discussion
Shawn_Higgin_84
Nimbostratus
Jun 25, 2005How to redirect if less than x nodes are avail
I was wondering if anyone knoes how do setup a iRule to do a redirect if there are less than x nodes available within a pool. Is there an easy way to do this? I have it working if there are no nodes...
unRuleY_95363
Jun 27, 2005Historic F5 Account
If you need to use a rule, you can use the command:
active_members This will return the number of active pool members in the pool.
Also, you can generate a log entry from the iRule and then add a configuration line to /etc/alertd/alert.conf to have alertd generate an snmp trap for you (you will likely have to restart alertd with "bigstart restart alertd"). Your alert line would look something like this:
alert BIGIP_RULES_RULESERR_RULE "^Rule (.*?): SNMPTRAP" {
snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.50"
}
The following iRule should then generate the trap.
when HTTP_REQUEST {
if { [HTTP::uri] contains "debug" } {
log local0. "SNMPTRAP - Request for debug"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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