Hi,
I am trying to obtain an IP address from a host. The available Ping nodes does not seem to return the IP address, so I tried the EXEC node with the following command:
nslookup myhost.com
This worked, but the object returned is not well formatted, so I could not extract the IP address easily.
The complete msg object looks like this:
If you are making less than 1,000 calls per month, you could use a free https://geo.ipify.org/docs account.
I've used them for years, and very reliable.
A GET call; https://geo.ipify.org/api/v1?apiKey=at_EHuas86RK4ujhduhsdssffb0JF9&domain=bbc.co.uk
returns a payload.ip of "151.101.0.81" plus lots of other information if you need/want it.