ltm rule command active nodes
iRule(1) BIG-IP TMSH Manual iRule(1)
active_nodes
Returns the alias for active members of the specified pool (for BIG-IP
version 4.X compatibility).
SYNOPSIS
active_nodes ('-list')? POOL_OBJ
DESCRIPTION
Returns the alias for active members of the specified pool (for BIG-IP
version 4.X compatibility).
RETURN VALUE
active_nodes
Returns the number of active members of the specified pool (for
BIG-IP version 4.X compatibility).
active_nodes -list
Returns a tcl list containing the IP address of each active member
in the specified pool.
VALID DURING
ANY_EVENT
EXAMPLES
when HTTP_REQUEST {
log local0. "There are [active_nodes http_pool] active nodes in the pool."
}
when CLIENT_ACCEPTED {
# Check if the client IP address is a node in the VIP's default pool
if {[matchclass [IP::client_addr] equals [active_nodes -list [LB::server pool]]]}{
log local0. "SNAT'ing for [IP::client_addr], member of pool [LB::server pool]"
snat automap
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-9.0.0 --First introduced the command. @BIGIP-9.4.2 --First
introduced the command.
BIG-IP 2017-01-31 iRule(1)