Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kibana - Get a list of all indices

I have ElasticSearch installed on a server and Kibana 3.0 installed on another machine. Is there any way to get a list of all the indices on the ElasticSearch server to show up on Kibana? Just like how ElasticSearch-Head displays it. Maybe in a new dashboard on Kibana that shows all the indices?

like image 686
user3775873 Avatar asked Jun 25 '14 15:06

user3775873


People also ask

How do I get a list of indexes in Kibana?

If you set your Kibana dashboard configuration to _all in index settings (the default for the sample dashboard at #/dashboard/file/guided. json), all indices will be queried. From there, you can add a terms panel for the _index field. That will list the top indices in terms of number of documents that they contain.

How do I get a list of all indices in Elasticsearch?

There are multiple ways to list all of the indexes contained in an Elasticsearch cluster. One common way of doing this is to use cURL and Kibana to issue HTTP requests to communicate with the Elasticsearch cluster to have it return all of the index names and their respective UUIDs.

How do I get Elasticsearch index data?

You can use the search API to search and aggregate data stored in Elasticsearch data streams or indices. The API's query request body parameter accepts queries written in Query DSL. The following request searches my-index-000001 using a match query. This query matches documents with a user.id value of kimchy .

How do you count indices in Elasticsearch?

Since you're using the _cat/indices API, you could simply return the results in JSON (instead of tabular form) and then pipe that into jq in order to get the length of the index array you get in the response. This will return a number equals to the number of indices you have.


2 Answers

you can get list of all indices with

curl 'localhost:9200/_cat/indices?v'
like image 88
Yuseferi Avatar answered Oct 19 '22 07:10

Yuseferi


First, you have to open your kibana.yml file and add this line

elasticsearch.url: "http://{IP of machine}:9200"

Then, restart your kibana. It will connect to elasticsearch of that machine

To get all indices run this

GET /_cat/indices?v
like image 41
Krishna Kumar Avatar answered Oct 19 '22 07:10

Krishna Kumar