Forum Discussion
philip-patrick
Jan 08, 2019Copper Contributor
Geolocation query from IP address
Hi, Any idea if that's possible (and if yes - how) to add resolving of IP address to geolocation and any other IP information in a query in Log Analytics? For example, part of the message body I hav...
Jayden_McKay
Jun 07, 2023Copper Contributor
philip-patrick
MyEvents
| extend ip_location=geo_info_from_ip_address(<IPADDRESS FIELD>) //replace the stuff between <>
Creates a new field called ip_location as an array with city / country / latitude / longitude / state fields inside
You may want to do some project's / extend's to neaten up.
FYI, it will technically have an error on the field name as its not a known function, it is - just ignore the error
MarekKu .
Mar 13, 2024Copper Contributor
That's the simplest solution I've come across so far. Thanks!