Splunk Search

limit results by 10 events per day in one month timeframe

Isaias_Garcia
Path Finder

Hi-
I have this search query:
"source="/prod/splunkforwarder/bin/scripts/jrexpiry.sh" npw.gov.se"
and my time frame is from April 1- April 30. The result it gets is 5,540 events. What I want is to just limit the results to 10 events per day in 1 month that is, on April 1st,it should only give 10 events, in Apr 2nd 10 events,in Apr 3rd 10 events and so on. How can I do this?Please advise. Cheers! Isaias

Tags (3)
0 Karma

mcmaster
Communicator

Try adding "| streamstats count by date_mday | where count <= 10" to your search. For example:

source="/prod/splunkforwarder/bin/scripts/jrexpiry.sh" npw.gov.se | streamstats count by date_mday | where count <= 10
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 ...