Visualising field values as count metric in Kibana

(vick) #1

Hi All,

I have already imported json results of to my index and I would like to visualise and plot the json results to take the Count from the field "doc_count":3467 and assign that to the respective country field. I had been having difficulty in plotting this data on a pit chart or vertical graph as the count metrics option only takes the number of times the specific field is seen in the logs. My requirement is to plot the count based on the value of the field. I am just stating with elastic search and kibana and any assistance on how this can be achieved is really helpful.

Example index values are below:

{"index": {"_id": 1}}
{"index": {"_id": 2}}
{"index": {"_id": 3}}
{"index": {"_id": 4}}
{"index": {"_id": 5}}
{"index": {"_id": 6}}

(Felix Stürmer) #2

Hi @ravick,

if I understand you correctly, you can achieve that with the following setup:

  • start a new pie-, line- or bar-chart of the desired type for your index
  • choose the Max aggregation over the field doc_count as the y-axis metric
  • choose the Terms aggregation over the field country as the x-axis buckets
  • adjust the bucket order and size to match your use-case

That could look like this:

(vick) #3

Hi @weltenwort,

That did the trick. Many thanks for your advice.
I am able to plot the graph i was expecting.

(system) #4

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