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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...