Splunk Search

how do I get daily average over a month for all the pages I receive

Path Finder

I receive about say between 10 to 20 alerts per day. All these pages shows as an event in my splunk. How do I find out what is average number of events I received daily over a month

so I tried like this

  • | timechart span=30d count | eval average=count/30

does that look right?

so lets say I receive 10 alerts on day1, 9 alerts on day2 and 8 alerts on day3 .. and so on for a month. I like splunk to tell me something like 9 as the average number of alerts I receive daily over a month.


Tags (1)


This is a bit old, but you can do this:

<your search here> | Stats avg(yourfield) by date_month,date_mday | sort date_mday
0 Karma

Splunk Employee
Splunk Employee

Probably easier to just use:

 ... | timechart span=1d count as dailycount | timechart span=1mon mean(dailycount)

which will work if you're dealing with partial months. (e.g., if today is the 22nd of the month and you run a report that goes over the last 60 days).


Is there a way to remove any day where the specific event count is 0? I would like to remove any day where the logs did not import. The days with events 0 are throwing off my averages. 

0 Karma

Splunk Employee
Splunk Employee

The best way to get statistics for this type of duration is to utilize a summary index:


That would allow you to do complete reporting across all the data over the whole month, on a daily basis.


You could enable indexing of the $SPLUNK_HOME/var/log/splunk/scheduler.log file. This file logs when an alert is sent from the scheduler. You would need to find out the exact alert you are triggering. You can then report the total count over 30 days and use your eval statement as described.

Path Finder

these alerts are not splunk related. for splunk they are just events.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...