Reporting

VIEW n events pear second

gbriones
Engager

I need  to show first 40 events pear seconds in the range 15 minutes.

 

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
... | sort _time
| eval seconds=floor(_time)
| streamstats count by seconds
| where count <= 40

View solution in original post

0 Karma

gbriones
Engager

For example, if 100 events fell in one second, I need to only take the first 40 and continue with the next second

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Assuming your search is over a 15 minute period, round time to seconds, and count events by second, then only keep the first 40 per second

... | eval seconds=round(_time,0)
| streamstats count by seconds
| where count <= 40
0 Karma

gbriones
Engager

Thanks for respond but  I see to look more 40 events pear second:

| dedup id | eval seconds=round(_time,0)
| streamstats count by seconds | where count <= 40 | timechart span=1s count

gbriones_0-1618416601195.png

 

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Does sorting by time first help?

... | sort _time
| eval seconds=round(_time,0)
| streamstats count by seconds
| where count <= 40
0 Karma

gbriones
Engager

keeps showing results greater than 40 😞

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
... | sort _time
| eval seconds=floor(_time)
| streamstats count by seconds
| where count <= 40
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...