Forum Discussion
F5: Curl command to get Node name from an IP address
Hi,
-
What curl command should I use to get Node name mapped to Node IP on F5? I have Node IP with me and wants to know Node name.
-
Is there a curl command to describe node based on IP address instead of node name?
Thanks
3 Replies
- damian_19221
Nimbostratus
No idea on your second question (it doesn't look like it supports using the IP), but here's a very quick and very dirty answer to the first one:
curl -k -X GET https://admin:PASSWORD@f5adminaddress/mgmt/tm/ltm/node |tr '\,}' '\n' |grep -B5 "your.ip.add.ress"|grep name|awk -F ':' '{print $2}'- vimal1771_20809
Nimbostratus
Thanks!!! I think using jq is much simpler in that case. curl -k -X GET https://admin:PASSWORD@f5adminaddress/mgmt/tm/ltm/node | jq '.items[] | select(.address==your.ip.add.ress) | .name'
- Kevin_Stewart
Employee
Is there a curl command to describe node based on IP address instead of node name?
Assuming you're talking about getting to the name or description of the node, then no.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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