Forum Discussion

Anesh's avatar
Anesh
Icon for Cirrostratus rankCirrostratus
Mar 02, 2017

How does active_members iRule API work?

do you need to any health monitor for the pool member for active_members iRule API to determine whether the pool member is UP Example: does an icmp monitor need to be applied to pool member for the active_members iRule to determine whether it is UP or not.

 

If a Health monitor is not required, how does active_members determine the health of the pool members?

 

1 Reply

  • Any pool member that is either up or unknown, can receive traffic. If the pool member does not have a monitor, it will be unknown. Also, when you apply a new monitor, it may take a while to get the first response, or reach the monitor timeout, so during that time is showing as unknown.

    Here is a quick example:

    ltm pool pool_http {
        members {
            LABServer1:http {
                address 172.16.0.11
            }
            LABServer2:http {
                address 172.16.0.12
                monitor http
                session monitor-enabled
                state up
            }
            LABServer3:http {
                address 172.16.0.13
                monitor https
                session monitor-enabled
                state down
            }
        }
    }
    

    With the following iRule:

    when HTTP_REQUEST {
      set members [active_members -list pool_http]
      log local0. "Active members are: $members"
    }
    

    I get in the logs:

    Mar  2 12:42:13 LABBIGIP1 info tmm7[17566]: Rule /Common/test1 : Active members are: {172.16.0.11 80} {172.16.0.12 80} 
    

    Pool member 172.16.0.11 does not have a monitor, the status is unknown, that means it can receive traffic, so it is active.

    Pool member 172.16.0.12 is up, so active.

    Pool member 172.16.0.13 is down, so it can't receive traffic, so is not active.