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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...