如何通过命令行获取Kibana索引模式的描述?

时间:2018-10-01 12:58:06

标签: elasticsearch curl kibana

要通过CLI获取Elasticsearch 索引的结构,我们可以执行以下操作:

curl -u myuser:p4ssw0rd -XGET "https://myeshost:9200/myindexname"

是否可以获取有关Kibana 索引模式的结构(或其他信息),或获取已创建的所有Kibana索引模式的列表?我尚未在文档中找到有关此信息。

2 个答案:

答案 0 :(得分:1)

有一种使用以下命令来检索所有Kibana索引模式的方法:

GET .kibana/_search?size=100&q=type:"index-pattern"

注意:如果索引模式超过100个,则可能要增加大小。

答案 1 :(得分:0)

使用功能_stats或_settings:

curl -u myuser:p4ssw0rd -XGET "https://myeshost:9200/myindexname/_stats"
curl -u myuser:p4ssw0rd -XGET "https://myeshost:9200/myindexname/_settings"

参考:

https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-stats.html

https://www.elastic.co/guide/en/elasticsearch/reference/6.3/indices-get-settings.html

相关问题