看,灰机...

logstash怎么用stdin导入csv

Logstash | 作者 Neal.Shan | 发布于2017年09月19日 | 阅读数:4173

CSV文件每周换一次,同步一次,也就只需要logstash执行一次。但是它不会自己关掉,网上老外说用stdin,但是没说具体怎么写,官网stdin也是内容很少,有大神遇到过吗?

这是我的file input配置,怎么用stdin来实现一样的
input {  
file {
path => "I:\dev\softpack\logstash-2.0.0_csv\bin\csv1\STP20160424.csv"
type => "csv"
}
}
filter {
csv {
columns => ["trait", "trait_department"]
separator => ","
}
}
output {
elasticsearch {
action => "index"
index => "logstash-test4-stp"
hosts => "localhost:9200"
workers => 1
}
}
已邀请:

要回复问题请先登录注册