Splunk Search

Can you help me find the location of a session?

jl23
New Member

I’m examining server logs where, for each session, there are several events. I’m trying to discover the country from which a session originated.

However, some of the events for a session have an IP defined and some don’t in sip field. Meaning that my current search is outputting two locations for the one session (the actual location and null) if the location is known.

index=i_s sourcetype=sess | iplocation sip | chart dc(session) by Country

And adding “dedup session “ to the query returns Unknown for sessions which should have a location.

Any help is appreciated!

0 Karma

bryhenderson
Explorer

I don't have the data on hand to examine your search, but you could try adding

| search Country=*

before your chart command, if you only care about sessions with a Country value.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...