[英]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.