Divide metrics and display them in Table Visualization



I want to create a very basic visualization in kibana. I have a field in the document namely which signifies the amount of memory consumed. A watch writes data into this index every 10 minutes.

Each document in elasticsearch will have an array of instances of a cluster with memory details.
{"memory": {
"instance_capacity": 4096,
"memory_pressure": 6
} },
{"memory": {
"instance_capacity": 4096,
"memory_pressure": 6
} }

I want to see the metrics in table Visualization as follows

    |Cluster Name|Used Memory in MB|Capacity in MB|num_records|Average Capacity|Calculate max of sum (Capacity in MB/num_records)|

I used sum aggregation to collect 'Capacity in MB'. but since there are 6 records inserted in a period of 1 hour, i want to calculate the last column 'Calculate max of sum (Capacity in MB/num_records)' by dividing 'Capacity in MB' with 'num_records' for calculating the report. Can anyone have ideas how to acheive it or are there any better alternatives to calculate such metrics?

(Bill McConaghy) #2

You could use a scripted field to do this calculation I think.

(system) #3

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