Splunk Search

iplocation when outputting in command stats

nalia_v
Loves-to-Learn Everything

Hello everyone,
Someone may already be doing the output of grouped events with the definition of location by ip.

How not to lose location data when grouping events ?location.png

In my request spl it is

| search......
|stats count(tunnelid) as sessioncount, values(StartTime) as StartTime, values(tunnelid) as tunnelid, values(tunnelip) as tunnelip, values(remip) as remip, values(vendor_action) as vendor_action by user
| iplocation remip

Of course, when displaying one type, the location IP is displayed.

How to display data on the location of each IP in grouped events ?

 

Labels (1)
Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Apparently, the iplocation command can't handle a multi-value field.  Try putting iplocation before stats.

| search......
| iplocation remip
| stats count(tunnelid) as sessioncount, values(*) as * by user

 

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

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...

Splunk Answers Content Calendar, June Edition II

Get ready to dive into Splunk Dashboard panels this week! We'll be tackling common questions around ...

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...