繁体   English   中英

Logstash 不向弹性搜索发送数据

[英]Logstash not sending data to elastic search

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 started {"pipeline.id"=>"main"} [2021-03-28T20: 27:02,531][INFO ][filewatch.observingtail ][main][f09c0225c6dfc66bb50a8d3706ec14e066921c92842bc5680d0b5bb0aee01580] START, creating Discoverer, Watch with file and sincedb collections [2021-03-28T20:27:02,554][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]} [2021-03-28T20:27:02,985][INFO ][logstash.agent ] 成功启动 Logstash API 端点 {:port =>9600}

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

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM