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
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
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}'
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.
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’