Forum Discussion
Bret_McGinnis_1
Nimbostratus
Aug 02, 2005Number of defined nodes in a pool
Is there a way in irules to determine the number of defined nodes in a pool. I'm trying to automate syslog notification when a pool is getting low on nodes. The number of active node is good but I need the context of how many nodes are in the pool. I would take a different action if I have 3 or 20 nodes active then I would if I have 3 out of 4 nodes active.
thanks
- unRuleY_95363Historic F5 AccountGosh, we sure managed to overlook that statistic. I will look into getting it added. Thanks.
- Bret_McGinnis_1
Nimbostratus
Is there any kludge I can use to get this information? - unRuleY_95363Historic F5 AccountThe only thing I can think of at the moment is to define an array in RULE_INIT that maps how many nodes are in each pool. That might be a bit unmanageable though...
when RULE_INIT { array set ::node_count { pool_A 15 pool_B 20 pool_C 5 } } when LB_SELECTED { set pool [LB::server pool] if { ([active_members $pool] * 100 / $::node_count($pool)) < 10 } { log "Pool $pool is has less than 10% active members!" } }
- Bret_McGinnis_1
Nimbostratus
Your suggestion works well. - Bret_McGinnis_1
Nimbostratus
Hi, - Roger_Oliver_78
Nimbostratus
Sorry as you can see i'm really new to the 9.x - Deb_Allen_18Historic F5 AccountYou would create a new iRule using the code above provided by unRuleY, modifying the names of the pools & of servers in each to match your situation.
when LB_SELECTED { if { [active_members SEARCH_NODES] < 12 } { log local0. "Pool SEARCH_NODES has less than 12 active members!" } }
- Bret_McGinnis_1
Nimbostratus
Hi, - Deb_Allen_18Historic F5 AccountSorry, didn't see your follow-up.
- Bret_McGinnis_1
Nimbostratus
Hi,
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