代码之家  ›  专栏  ›  技术社区  ›  ngi

Logstash 6.0.0:elasticsearch的未知设置–索引类型

  •  0
  • ngi  · 技术社区  · 7 年前

    我试图在ELK 6.0.0 docker image上运行logstash配置文件,但出现以下错误: elasticsearch的未知设置“index\u type”

    我正在检索Spark streaming stats并将其发送给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"
      }
    }
    
    2 回复  |  直到 7 年前
        1
  •  1
  •   Tim    7 年前

    我遇到了这个错误:elasticsearch的未知设置“index\u type”

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

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

    你是说 document_type ?

        2
  •  0
  •   Val    7 年前

    正确的语法是 document_type index_type :

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