Splunk Search

Can't get iplocation to work in my search

hmrabet2
Observer

I am not getting iplocation working in this query:

tag= web | stats count by IP, sessionId | stats dc(IP) as count, values(IP) as clientIP by sessionId | where count> 5 | iplocation clientIP

I can see the country, city, region fields appear but they are not populated

But when I run the following search I get IP location working with the country, region etc fields populated.

tag= web | iplocation IP | table IP, Country
0 Karma
1 Solution

hortonew
Builder

Add a | mvexpand clientIP after your stats command and it should work. I don't believe iplocation works on multivalue fields

View solution in original post

hortonew
Builder

Add a | mvexpand clientIP after your stats command and it should work. I don't believe iplocation works on multivalue fields

hmrabet2
Observer

Thanks that's done the trick

0 Karma

richgalloway
SplunkTrust
SplunkTrust

If your problem is resolved, please accept the answer to help future readers.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...