Splunk Search

How do I edit my search to find what version of a product users are on?

Path Finder

My logs have the following info:

userid, version, timestamp

What is the best way to get a report of what product version users are on? I tried:

sourcetype="Apache2" | table timestamp userid version

but it's not exactly what I need. How can you restrict userid to last encountered version, and also search unique userids.

0 Karma

Splunk Employee
Splunk Employee

answer by @vskoryk_splunk

.. | stats latest(version) latest(_time) by user


0 Karma


Try this. It will find the most recent event for each userid, which should be the last encountered version.

sourcetype="Apache2" | dedup userid | table timestamp userid version
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 2 releases of new security content via the ...

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...