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
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 ...