Get count of fields in Kibana


(R a V) #1

Hello,

we're gathering an inventory of virtual machines from vcenters. I was just wondering if there's a way we can create a new field with a count of total VMs or with a count of the total number of ESX servers or something like the total memory of all VMs.
However I'm not sure how to get this done. I did try creating scripted fields, but if I understood it right it can used only a doc.

For example, I was able to create a new field converting memory in mb to memory in gb. However how can I create a new field containing the sum of memory of all VMs?

I'm no expert, but I can sense that it doesn't make sense trying to add a field with the same value to all docs. But can we create a new index which contains such calculated values?


(Imma) #2

You could create a kibana metric, with a unique count of your hostnames. No need to create a field in elasticsearch.


(R a V) #3

Thanks a lot! That was a life-saver.


(system) #4

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