简体   繁体   English

如何通过 ElasticSearch API 找出是否在任何索引模板中使用了组件模板?

[英]How to find out if component templates are used in any index template via ElasticSearch API?

I'm looking for an API call for ElasticSearch which helps me figuring out if the component template has any usage count, if it is used by any index template.我正在寻找对 ElasticSearch 的 API 调用,它可以帮助我确定组件模板是否有任何使用计数,如果它被任何索引模板使用。

We can see this information through Kibana -> Index management -> Component templates -> Usage count.我们可以通过 Kibana -> Index management -> Component templates -> Usage count 看到这些信息。 But not sure which API call would provide this.但不确定哪个 API 调用会提供此功能。

Thanks谢谢

There's no API providing that information directly, Kibana infers that count on the client-side by retrieving all index templates and counting the component templates usage.没有 API 直接提供该信息,Kibana 通过检索所有索引模板并计算组件模板使用情况来推断客户端的计数。

An easy way to do it is to call the following API and parse the response一个简单的方法是调用以下 API 并解析响应

GET _cat/templates?format=json&filter_path=name,composed_of

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何修改由nutch索引编写器用于elasticsearch的索引模板? - How to modify the index template used by the nutch index writer for elasticsearch? 如何在elasticsearch中找出索引创建日期 - How to find out the index creation date in elasticsearch 弹性搜索索引模板中可以使用变量吗? - Can variables be used in elasticsearch index templates? 如何在Elasticsearch java api中找到Alias索引? - How to find Index by Alias in Elasticsearch java api? 基于Elasticsearch文件的索引模板未显示在“ / _template” API调用中 - Elasticsearch file-based index templates not showing up in “/_template” API call 如何找出 Elasticsearch 中模糊查询使用的所有变体? - How to find out all variations used by Fuzzy query in Elasticsearch? Elasticsearch-如何找出特定索引的类型 - Elasticsearch - How to find out what is the type of a particular index 如何找出Elasticsearch中我的索引排序的依据? - How to find out what is my index sorted by in elasticsearch? Elasticsearch:如何找出一个值是否与列表中的任何值匹配? - Elasticsearch: how to find out if a value matches any value in a list? 如何从 elasticsearch 中的模板创建 map 新索引 - How to map new index from templates in elasticsearch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM