Splunk Search

How to edit my search to find the average events per second for each day from the past week?

splunkrocks2014
Communicator

I am using the following query to calculate the average events per second

| tstats count where index=* groupby index, _time span=1s | stats avg(count) as AverageCountPerSec

However, the number is lower than one of the indexes. What did I miss? How to calculate the average events per second for each day from the past week?

Thanks.

0 Karma

somesoni2
Revered Legend

You want to calculate EPS for each index or for all? Also, you say each day of past week, so you expect 7 rows with showing average of each day of last week?

0 Karma

vasanthmss
Motivator

try this,

Average,

| tstats count where index=* by  index _time span=1s | stats avg(count) as avg by _time

Overall,

| tstats count where index=* by  _time span=1s

For index wise,

| tstats count where index=* groupby index, _time span=1s | xyseries _time, index, count
V
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...