Splunk Search

iplocation command not returning lat/lon fields (with allfields=true)

adewinter
Explorer

As in subject, I run the following command:

MY_SEARCH | iplocation allfields=true clientip | table lat lon

And the table is empty.

I have verified that clientip does contain values, and that other fields like "City", "City1" and "City2" contain values.

I've also found that the prefix=some_prefix_ option for the "iplocation" command does not work either.

Am I doing something wrong?

0 Karma

moizmmz
Path Finder

I read in another answer that if the ip addresses are private, the command won't work. (quite obvious now that I think about it)

0 Karma

SuganyaSSF
Explorer

Hi ,

I am facing the similar and the above solution doesn't seem to work , do we have any way to get the location details based on the ip address in splunk

0 Karma

Lazarix
Communicator

The right way to use this command is like:

|table c_ip | stats count by c_ip | iplocation c_ip  

You can then visualise this on a map like:

|table c_ip | stats count by c_ip | iplocation c_ip | geostats latfield=lat longfield=lon sum(count) as count by c_ip globallimit=0 

jdanucalov1
New Member

Doesn't work. As the poster mentioned the lat/lon fields aren't being produced at all by iplocation. I'm experiencing the same issue.

0 Karma

krish3
Contributor

I have same problem did u get anything that fixed this issue?

0 Karma
Get Updates on the Splunk Community!

Leveraging Detections from the Splunk Threat Research Team & Cisco Talos

  Now On Demand  Stay ahead of today’s evolving threats with the combined power of the Splunk Threat Research ...

New in Splunk Observability Cloud: Automated Archiving for Unused Metrics

Automated Archival is a new capability within Metrics Management; which is a robust usage & cost optimization ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...