Use elasticsearch to query kibana dashboards?

Hey there

Is it possible to get the statistics that are shown by my Kibana dashboard? Simple things like the top 3 things with the biggest counts.

For example, with Packetbeat, I want to see the most common IP addresses that are shown in my Kibana dashboard.

Is that possible with a query in elasticsearch?

Yes, you can just grab the query from the visualization and see how kibana is doing it.
2.4
Just go to Settings -> Objects -> visualizations and view the visualization that you want to replicate

and you can see how it is made

5.3 similar steps

but to read up on the docs, you want to make "Aggregations"
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html

But I like seeing how Kibana does it then modifying the query from there.Saves me time thinking

Ok that makes sense, but how would I translate that into a curl request or similar?

Just issue what Kibana issues via curl

curl -XPOST /index/_search -d ' { }'

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