Splunk Search

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

aniketb
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

mreynov_splunk
Splunk Employee
Splunk Employee

answer by @vskoryk_splunk

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

http://docs.splunk.com/Documentation/Splunk/6.1/SearchReference/Commonstatsfunctions

0 Karma

richgalloway
SplunkTrust
SplunkTrust

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!

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 ...