Forum Discussion
How does active_members iRule API work?
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.
Recent Discussions
Related Content
* 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