Use elasticsearch to query kibana dashboards?


(Ben Hoffman) #1

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?


(Ed) #2

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


(Ben Hoffman) #3

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


(Ed) #4

Just issue what Kibana issues via curl

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


(system) #5

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