要通过CLI获取Elasticsearch索引的结构,我们可以执行以下操作:
curl -u myuser:p4ssw0rd -XGET "https://myeshost:9200/myindexname"
有没有办法获取有关 Kibana 索引模式的结构(或其他信息(,或获取已创建的所有 Kibana索引模式的列表?我还没有在文档中找到有关此的信息。
有一种方法可以使用以下命令检索所有 Kibana 索引模式:
GET .kibana/_search?size=100&q=type:"index-pattern"
注意:如果索引模式超过 100 个,则可能需要增加大小。
使用函数_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