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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...