Forum Discussion
dalexand_127251
Nimbostratus
Oct 29, 2003Threshold for minimum number of nodes in a pool
We would like to define a threshold for the minumum number of nodes in a pool when a pool is created. This threshold would be used by external monitoring to generate alerts when the number of active nodes falls below the threshold. Is there a way to do this using the iControl API? The closest thing that I have found is the get_minimum_active_member method, but changing this value affects the load balancer's behaviour. Are there any user defined values that could be used for this purpose?
Thanks,
Dave
- Minimum active members are used to specify a threashold on a pool to change packet distribution to other priority groups when the threashold is reached. If you don't want load balancing decisions to be effected by the number of active members then minimum active members is not what you want.
void get_member_list( in String pool_name, out IPPortDefinition[] members ); void get_member_active_states( in String pool_name, in IPPortDefinition[] member_defs, out MemberState[] member_states );
// Get member list Pool.get_member_list(pool_name); // extract member list from results Pool.get_member_active_states(pool_name, member_list); // extract active states from results // iterate through list and count active members if ( active_members < threshold ) { // send alert }
- dalexand_127251
Nimbostratus
I'm using perl to get the member active states, and I'm having trouble figuring out how to pass the member_defs argument to the get_member_active_states method. The code samples provided in the SDK only pass simple parameters like strings, but I can't figure out how to pass an IPPortDefinition[] struture. - Sorry I didn't get back to you sooner as I just got back from vacation.
------------------------------------------------------------------------ Get Member List ------------------------------------------------------------------------ print "Members : {"; (@member_list) = getPoolMemberList($sPool); foreach my $member (@member_list) { print $member->{"address"}, ":", $member->{"port"}, ", "; } print "\b\b}\n"; ------------------------------------------------------------------------ Get member active states ------------------------------------------------------------------------ print "Member Active States :\n"; $soap_response = $soap->get_member_active_states ( SOAP::Data->name(pool_name => $sPool), SOAP::Data->name(member_defs => [@member_list]) ); @member_states = @{$soap_response->result}; foreach my $member_state (@member_states) { $member_def = $member_state->{"member_def"}; $member_ip = $member_def->{"address"}; $member_port = $member_def->{"port"}; $active_state = $member_state->{"active_state"}; print " ", $member_ip, ":", $member_port, ": ", $active_state, "\n"; }
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