Splunk Search

Is there a way to limit the number of events included in the search result per user?

ewanbrown
Path Finder

I have some data, which includes a user id.

I can count the number of pageviews, and also the number of unique users who have viewed a page with this search

index=beacon BeaconType=pageview  | stats count, dc(INID)

I'd like to count the total number of pageviews, but cap each user to only have 10 views included. Do you know if this is possible?

Thanks

Tags (3)
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Try something like this. This will take only the 10 (if available) events per INID, rest logic is same.

index=beacon BeaconType=pageview | dedup 10 INID | stats count, dc(INID)

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

Try something like this. This will take only the 10 (if available) events per INID, rest logic is same.

index=beacon BeaconType=pageview | dedup 10 INID | stats count, dc(INID)

ewanbrown
Path Finder

Thanks a lot!

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