Splunk Search

How to get Country and City from latitude and longitude logs

herguzav
Explorer

Hi frends

 

I have logs like

_time=time latitude=1 longitude=-1 other fields ...

_time=time latitude=1 longitude=-2 other fields ...

Etc

The objective is to translate the latitude and longitude values ​​to their associated countries and then apply

filters on these values ​​but I only have these values.

 

Hope can help me.

 

Regards

 

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Splunk has a built-in lookup table for converting lat/long into country name.

| lookup geo_countries latitude longitude OUTPUT featureId as country
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Splunk has a built-in lookup table for converting lat/long into country name.

| lookup geo_countries latitude longitude OUTPUT featureId as country
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...