Forum Discussion
vimal1771_20809
Nimbostratus
Aug 21, 2015How to get node (server) list from VIP name
What is the curl command to get node list from virtual server name?
2 Replies
- Vitaliy_Savrans
Nacreous
You can get node list:
tmsh -c 'list ltm virtual virtual_server_name' `from previuos command you get pool_name, then:` tmsh -c list 'ltm pool pool_name'the output will be node list
- Kevin_Stewart
Employee
You do indeed need to query the VIP first to get the name of the assigned pool:
curl -vsk -u 'admin:admin' -H "Content-Type: application/json" -X GET https://x.x.x.x/mgmt/tm/ltm/virtual/my-vsand then you can query for the pool members:
curl -vsk -u 'admin:admin' -H "Content-Type: application/json" -X GET https://x.x.x.x/mgmt/tm/ltm/pool/my-pool?expandSubcollections=trueor if you want to get fancy:
curl -vsk -u 'admin:admin' -H "Content-Type: application/json" -X GET https://x.x.x.x/mgmt/tm/ltm/pool/my-pool?expandSubcollections=true | sed 's/,/\'$'\n/g' | grep name | grep -v my-pool | awk -F"\"" '{ print $4 }'
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects