Compute a % out of absolute values in Kibana

Hi there!

I've been searching on the threads for a way to do this, but I'm afraid that it's not something I can do.

Anyway, just in case I missed something: I have 5 nodes reporting used and total memory. I need to show and compute avg memory utilization, in %. It would be something like avg ( used mem/total mem), that is: first compute the memory utilization per node, then make the average.

I've tried to use the formula option to make this, but I can only do something like avg (sum(used mem) / sum (total mem)), which is not what I want. This makes me sum the total used Bytes and divide by the total available bytes, which is like an overall %, but it's not the avg of the % used per node.

Is there a way to do this without modifying index mappings or using scripted fields? I do not have access to that in my Kibana.

Thank you!

Hi @InesCM

The best approach here I can recommend is to define the ratio metric first:

sum(used_mem) / overall_sum(sum(total_mem))

The define a Breakdown dimension in Lens with the Collapse by Average operation.

Hi Marco!

Thanks for your reply!

I'm not sure if I'm understanding, if I define a Breakdown, I do not have a collapse by option. I just have Date Histogram, Filters, Top Values and Intervals.

I'm using Kibana 7.17.6.

Kind regards,
Inés

It is a function introduced in 8.3.0.

Fully understood, thanks so much!