Kibana field _count

(Binuraj P Sasidharan) #1

Hello Team,

Please find the below scenario.

I have field like Booking_Source, this field have value like as below

Booking_Source : AXS
Booking_Source : INF
Booking_Source : APL

How to get the count of Booking_Source field. Here is the count of Booking_Source this filed is 3. How to get that count using JSON script in Kibana.


(Shelby Sturgis) #2

If you are just doing a search, you can enter this in the Kibana search bar:

Booking_Source: *

This will return all documents with a Booking_Source field. The count of all the documents is the value you are looking for, which will be the default for any visualization in the Visualize tab.

(Binuraj P Sasidharan) #3

Thank you for your reply.

But I am checking "How to get that count using JSON script in Kibana." ?

(Lee Drengenberg) #4

Hi Binuraj,

You don't have to use JSON to get the count in Kibana. You can just use the GUI to select the fields you want and the types of aggregations and Kibana does the JSON for you.

In this screenshot I got the count of each response code;

And in this screenshot I got the count of unique response codes (3 different codes);

If you click the up arrow at the bottom of the chart you can then click on the Request button to see the JSON of the query that Kibana sent to Elasticsearch.


(system) #5