Splunk Search

How to search and table the daily average per value of another field?

epsplnkusr
New Member

In my logs, I capture application errors and the log includes the application version. I have figured out with the search below how to get a daily average of all errors logged by any version:

 <My Query for Error Condition>
 | bucket _time span=1d
 | stats count by _time
 | stats avg(count) as AverageCountPerDay

This gives me a single value of average logged errors. What I want to do next is have a table output, listing the average errors for each of the version values in my Application. Instead of a single value for all the output, I would have multiple rows with the columns: Version and Avg Daily Errors

0 Karma

jluo_splunk
Splunk Employee
Splunk Employee

Hi epsplnkusr,

If you can parse out the version #, you could do something like..

... | stats avg(count) by version | rename avg(count) as "AverageCountPerDay"

0 Karma
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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...