mark
mark

Reputation: 62712

Is it possible to run an elasticsearch aggregation query in Kibana?

I would like to run the following aggregation query in Kibana:

GET _search
{
  "size": 0,
  "aggs": {
    "group_by_host": {
      "terms": {
        "field": "host",
        "size": 20
      }
    }
  }
}

I can run it in the dev tools console (what used to be called Sense), but I would like to run it in the Kibana proper. Having a hard time figuring it out.

Upvotes: 12

Views: 14039

Answers (1)

alpert
alpert

Reputation: 4655

Just create a Chart from Visualize tab.

Then buckets => X Axis (or Split Rows or whatever based on your chart type) => Terms => Choose your field.

enter image description here

Then click Advanced link and write {"size":10} to there:

enter image description here

Hope that helps!

Upvotes: 13

Related Questions