Splunk Search

How to add a column of averages to a timechart?

JLIVE101
Engager

Similar to how timechart sum() by ip | addtotals which adds a "Totals" Column to a timechart, how can you add an averages column?

0 Karma

somesoni2
Revered Legend

I don't think there is a native way to get that. Try this workaround

... timechart sum(..) by ip | eval count=0 | foreach * [eval count=count+1] | addtotals | eval Average=Totals/count
0 Karma

jhayIV
Engager

This worked perfect for me

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