Show visualization of calculation between two field

(Mark) #1

Hi All

I am collecting vsphere stats via metricbeat and sending them to my elastic install.

What I would like to be able to show is the %age of cpu used and memory used.
Below is a log that shows the total cpu and used cpu and total memory and used memory, is it possible to do the calculation on these two fields to get the %age used and then show this as a visualization for a new dashboard i am building for office

Thanks in advance

(Jen Huang) #2

Yes, you can do this by creating a scripted field in Management > Index Patterns > Scripted fields > Add scripted field:

Name the field whatever you'd like. The field should be number type and Percent format. The script itself should look something like this:

(doc[''].value + 0.0) / doc[''].value

Save the field and repeat the process for calculating memory. Then you can use the new scripted fields in visualizations.

(Mark) #3

Jen-huang Thank you very much for your reply.
I have now got exactly what I was after, such a brilliant product and community


(system) #4

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