【问题标题】:Logstash not sending data to elastic searchLogstash 不向弹性搜索发送数据
【发布时间】:2021-06-24 19:27:31
【问题描述】:
input { 
   file{
path => "C:/elastic_stack/*.csv"
start_position => "beginning"
sincedb_path => "null"
     }
}
filter {
csv { separator => ","
columns => ["name","mfr","type","calories","protein","fat","sodium","fiber","carbo","sugars","potass","vitamins","shelf","weight","cups","rating"]
}
}
output {
elasticsearch
{ hosts => "http://localhost:9200/"
  index => "cereals"
}
stdout {}
}

在 cmd 中我看到了消息 [2021-03-28T20:27:02,468][INFO][logstash.javapipeline][main] 管道启动 {"pipeline.id"=>"main"} [2021-03-28T20:27:02,531][INFO][filewatch.observingtail][main][f09c0225c6dfc66bb50a8d3706ec14e066921c92842bc5680d0b5bb0aee01580] 开始,创建 Discoverer,Watch with file 和 sincedb 集合 [2021-03-28T20:27:02,554][INFO][logstash.agent] 正在运行的管道 {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]} [2021-03-28T20:27:02,985][INFO][logstash.agent] 成功启动 Logstash API 端点 {:port=>9600}

但是数据没有发送到弹性搜索。在 kibana 中我无法创建索引。

【问题讨论】:

    标签: elasticsearch logstash


    【解决方案1】:

    它是否将任何内容打印到标准输出?如果不是,则 .csv 文件中没有任何行被解析。

    您似乎在 Windows 机器上,然后尝试通过将 sincedb_path 的值设置为 NUL (https://github.com/logstash-plugins/logstash-input-file/issues/26) 来禁用它

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-19
      • 1970-01-01
      • 2018-05-07
      • 1970-01-01
      • 2014-03-26
      相关资源
      最近更新 更多