Forum Discussion
mapping servers to pools to vips
is there a command to show the bindings of servers > pools > wips? i know "show gtm virtual-server detail" will return the inverse but i want to look at a server and know what vips it's mapped to, if any.
- Simon_BlakelyEmployee
Unfortunately, the short answer is no.
Servers can be assigned to multiple pools, and the mapping between vips and pools can be extremely flexible (via irules and Local Traffic Policies). This makes it hard to work backward from nodes to virtuals.
The long (and very limited) answer is ...
Start with
tmsh -q -c "list ltm pool one-line" | grep <node ip>
shove it through awk
tmsh -q -c "list ltm pool one-line" | grep <node ip> | awk '{print $3}'
to get a list of pool names that contain the specific node IP (or name) as members.
Then we can use a bash loop to pump those names into a similar command to look at virtuals searching on pool names ...
tmsh -q -c "list ltm virtual one-line" | grep <pool name> | awk '{print $3}'
Putting that all together:
for i in $( tmsh -q -c "list ltm pool one-line" | grep <node ip or name> | awk '{print $3}'); do echo $(tmsh -q -c "list ltm virtual one-line" | grep $i | awk '{print $3}') ; done
Note: this only works for nodes and pools that are the default pool on a virtual
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