Average of a metric

hello!

I am currently ingesting metrics to Elasticsearch and I was interested in calculating a daily average of a specific metric via Rollup.

After reading some discussions I saw that it was normal to perform the sum (metric.value) on one hand and the count (metric.count) on the other, but I need to have a field with the value of the average. Is there any other option to get it? Script fields, Logstash .... ?

Thanks in advance!

When configuring the rollups you have the option to set the metric to Average. And if you want it to be daily, make sure to set the interval to 24h in the histogram. That is all that will be needed to get a daily average of a specific metric.

when you select the avg rollup of a metrics it doesnt do the average. it create two fields:

  • sum
  • count

and if you want to keep the real average , you have to do field.sum / field.count.

is there any way to have this field by default ? without doing the operation ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.