【问题标题】:Logstash 6.0.0: Unknown setting ‘index_type’ for elasticsearchLogstash 6.0.0:elasticsearch 的未知设置“index_type”
【发布时间】:2017-12-05 20:14:28
【问题描述】:

我正在尝试在 ELK 6.0.0 docker 映像上运行 logstash 配置文件,但出现此错误: elasticsearch的未知设置'index_type'

我正在检索 Spark 流统计并将其发送到 elasticsearch,但即使是这个简单的任务也会返回错误。这是我的代码:

input {
  graphite {
    codec => "json"
    port => 10513
    host => "0.0.0.0"
  }
}

output {
  #stdout { codec => "json" }

  elasticsearch {
    codec => "json"
    hosts => "localhost"
    index => "spark-%{+YYYY.MM.DD}"
    index_type => "spark"
  }
}

【问题讨论】:

    标签: elasticsearch logstash elastic-stack


    【解决方案1】:

    我收到了这个错误:Unknown setting 'index_type' for elasticsearch

    错误意味着它所说的。您的配置在 elasticsearch 输出中有 index_type,但这不是一个有效的设置。

    Logstash 不允许您包含无法识别的设置。

    您是说document_type 吗?

    【讨论】:

      【解决方案2】:

      正确的语法是document_type 而不是index_type

        elasticsearch {
          codec => "json"
          hosts => "localhost"
          index => "spark-%{+YYYY.MM.DD}"
          document_type => "spark"          <--- change this
        }
      

      【讨论】:

      • 我在这个新配置中遇到了同样的错误(弹性搜索的未知设置'index_type')
      • Unknown setting ‘index_type’ for elasticsearch 表示设置仍命名为index_type 而不是document_type
      猜你喜欢
      • 2023-03-16
      • 1970-01-01
      • 1970-01-01
      • 2012-12-26
      • 1970-01-01
      • 2017-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多