Forum Discussion

Ken_Wong_48678's avatar
Ken_Wong_48678
Historic F5 Account
Apr 16, 2008

Check pool member state

Hi,

 

 

From the icontrol code share, there is a perl script PoolMonitorInstances.pl which can retrieve the monitor state of pool member. And from the output there is also a "Enabled State". But I find it always shows "Enable" even I disable the pool member. Is there any other script which can retrieve the pool member state or how can I modify the original script? Thanks in advance

 

 

The output shown below.

 

 

 

Pool WebPool2 {

 

Member : 192.168.20.2:0

 

Template : gateway_icmp

 

Address Type : ATYPE_EXPLICIT_ADDRESS_EXPLICIT_PORT

 

Instance State: INSTANCE_STATE_UP

 

Enabled State :Enabled

 

}
  • The Enabled State presented in that script is not for the pool member's state, it's for the monitor instance associated with that pool member. That means that even though the member is marked down, the monitor is still enabled on that pool member.

     

     

    If you want to determine the state of the pool member itself, you'll have to use the methods in the LocalLB.PoolMember interface. An example is the togglePoolMember code share sample

     

     

    http://devcentral.f5.com/Wiki/default.aspx/iControl/TogglePoolMember.html

     

    Click here

     

     

     

    -Joe
  • I have a question about that TogglePoolMember script. Under "Attempt to add auth headers to avoid dual round trip", the two eval blocks are identical. Is this correct? Or, should one be calling "PoolMember->transport" instead of "Pool->transport"?
  • It's just an optimization for newer versions of SOAP::Lite so it shouldn't effect the functionality of the script. But you are right, I meant to have one line for both. I've updated the CodeShare entry.

     

     

    Thanks for the catch!

     

     

    In the future, feel free to update the Wiki entries yourself if you find a bug. We get all the change notifications and if something is done incorrectly we can always revert it.

     

     

    -Joe