Splunk Search

highest event count in given time frame per seconds

ronport2020
New Member

I'm trying to do the following search based on my index 'transactions' and field name called 'customers' for a custom time range

 

Top 10 highest historical peak rates averaged over the following intervals (1 sec, 10 sec, 60 sec, 5 min)

Top 10 highest daily transaction counts

Labels (2)
0 Karma

Richfez
SplunkTrust
SplunkTrust
...
| bin span=1s _time 
| stats count by _time
| stats max(count) as "winner winner chicken dinner"

That's probably your basic need right there.  Change "span=..." to whatever you need.  'count' is probably what you want to use for the counts, but the peak rates - you don't tell us how those even might be calculated. It might be "max(fieldname)" or something else. 

Note, I think by second probably isn't gonna be a very fast thing to do over a longer period of time.  There are 86,400 if those it'll calculate every day...

Report acceleration may help, and/or building a data model and accelerating that.  Or using tstats if they're indexed fields you are fiddling with.  Lastly, this might actually be a good use for using a summary index.

All of those things are easily able to be found with a search of (using google syntax, but I think most search engines follow that?) 'Splunk report acceleration site:docs.splunk.com' (obviously, change the keywords in there).

Happy Splunking,

Rich

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!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...