Performing simple math in Kibana for y-axis

(Shruthi S) #1

Documents that I index into kibana have a field, "action" which can either have a string of the action performed or "no-action".

My x-axis is a histogram on field "age" in each document (multiple documents can have the same value for this field)

For each bucket created, in Kibana I want to graph a metric of :

number of documents having no no-action / total number of documents

How do I go about performing the above summation then division and plot it on kibana (as y axis value)?

(Khalah Jones Golden) #3

I believe what you want to do is to use a sub aggregation to split bars, with a filter for "no-action" that should give you what you want.

(Shruthi S) #4

It would involve a sub aggregation but the end result required that I
described in the equation is like the example given here -

(Khalah Jones Golden) #5

Scripted fields is the answer to your conundrum!

They are in settings/indices after you choose a specific index on the left.

(system) #6