elasticsearch,indexing,Templates,elasticsearch,Indexing" /> elasticsearch,indexing,Templates,elasticsearch,Indexing" />

Templates 创建应用于ElasticSearch中所有内容的索引模板的正确方法

Templates 创建应用于ElasticSearch中所有内容的索引模板的正确方法,templates,elasticsearch,indexing,Templates,elasticsearch,Indexing,我还不熟悉ElasticSearch技术,目前正在努力创建将应用于所有新索引的索引模板,但无法创建正确的索引模板 当前运行的ElasticSearch 7.9.2及其文档告知,索引模式字段是必需的,并且应该是通配符数组(*匹配任何字符串) 当然,我已经尝试通过Kibana的控制台使用[“*”]作为模式来请求: PUT _index_template/template_1 { "index_patterns": ["*"], "priori

我还不熟悉ElasticSearch技术,目前正在努力创建将应用于所有新索引的索引模板,但无法创建正确的索引模板

当前运行的ElasticSearch 7.9.2及其文档告知,
索引模式
字段是必需的,并且应该是通配符数组(
*
匹配任何字符串)

当然,我已经尝试通过Kibana的控制台使用
[“*”]
作为模式来请求:

PUT _index_template/template_1
{
  "index_patterns": ["*"],
  "priority": 0
}
我有:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "null_pointer_exception",
        "reason" : null
      }
    ],
    "type" : "null_pointer_exception",
    "reason" : null
  },
  "status" : 500
}
而对于添加空
设置的请求

PUT _index_template/template_1
{
  "index_patterns": ["*"],
  "template": {
    "settings": {
      
    }
  },
  "priority": 0
}
我收到:

#! Deprecation: index template [template_1] has index patterns [*] matching patterns from existing older templates [.monitoring-es,.triggered_watches,.management-beats,.transform-internal-005,.logstash-management,.monitoring-kibana,.kibana-event-log-7.9.2-template,.ml-config,.watch-history-11,.ml-meta,ilm-history,.monitoring-logstash,.ml-state,.slm-history,.ml-inference-000002,.monitoring-beats,.monitoring-alerts-7,.ml-anomalies-,.watches,.ml-notifications-000001,.transform-notifications-000002,.ml-stats] with patterns (.monitoring-es => [.monitoring-es-7-*],.triggered_watches => [.triggered_watches*],.management-beats => [.management-beats],.transform-internal-005 => [.transform-internal-005],.logstash-management => [.logstash],.monitoring-kibana => [.monitoring-kibana-7-*],.kibana-event-log-7.9.2-template => [.kibana-event-log-7.9.2-*],.ml-config => [.ml-config],.watch-history-11 => [.watcher-history-11*],.ml-meta => [.ml-meta],ilm-history => [ilm-history-2*],.monitoring-logstash => [.monitoring-logstash-7-*],.ml-state => [.ml-state*],.slm-history => [.slm-history-2*],.ml-inference-000002 => [.ml-inference-000002],.monitoring-beats => [.monitoring-beats-7-*],.monitoring-alerts-7 => [.monitoring-alerts-7],.ml-anomalies- => [.ml-anomalies-*],.watches => [.watches*],.ml-notifications-000001 => [.ml-notifications-000001],.transform-notifications-000002 => [.transform-notifications-*],.ml-stats => [.ml-stats-*]); this template [template_1] will take precedence during new index creation
{
  "acknowledged" : true
}
响应仅取决于是否存在空的
模板。设置
似乎有点问题

尽管如此,后一种方法似乎是可行的,但弃用警告听起来既危险又令人沮丧(我曾尝试将优先级设置为0,但没有效果)。然而,
“*”
的示例。所以这种功能不久前就存在了


如果有的话,构建“匹配所有”索引模板的正确方法是什么?

当前要匹配所有索引,您确实需要使用
*
作为索引模式,并且警告存在,因为它将匹配任何内容,包括内部系统索引

根据模板中的内容,这可能导致工作不正常或破坏系统


github上有一个关于它的链接,主要是关于
.security
索引,当您使用“全部匹配”索引模式时,它也会受到影响,还有一种方法也解决了这个问题。

当前要匹配所有索引,您确实需要使用
*
作为索引模式,并且警告存在,因为它将匹配任何内容,包括内部系统索引

根据模板中的内容,这可能导致工作不正常或破坏系统


github上有一个关于它的链接,主要是关于
.security
索引,当您使用“匹配所有索引”模式时,它也会受到影响,还有一个链接也会处理这个问题。

您能提到问题本身的post Payload吗?您能提到问题本身的post Payload吗?谢谢,似乎我需要确定一些前缀模式。谢谢,似乎我需要确定一些前缀模式。