ltm rule command nodes
iRule(1) BIG-IP TMSH Manual iRule(1)
nodes
Lists all nodes within a given pool.
SYNOPSIS
nodes (-list)? POOL_OBJ
DESCRIPTION
This command behaves like active_nodes but lists all nodes in a pool,
not just nodes that are currently active.
Syntax
nodes
* Returns the number of pool nodes.
nodes -list
* Returns a list of the pool nodes.
RETURN VALUE
VALID DURING
EXAMPLES
#!/bin/bash
echo "Active:Total members for $1: `curl -s http://172.18.201.234/pool//$1`"
when HTTP_REQUEST {
set in_path [HTTP::path]
log local0. "debug request: path $in_path"
switch -glob $in_path {
"/pool*" {
set pool [string map {"/pool" ""} $in_path]
HTTP::respond 200 content "[active_members $pool]:[nodes $pool]"
}
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-10.0.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)