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