【发布时间】:2014-07-20 16:44:53
【问题描述】:
我对 Logstash 有一个奇怪的问题。我正在提供一个日志文件作为logstash 的输入。配置如下:
input {
file {
type => "apache-access"
path => ["C:\Users\spanguluri\Downloads\logstash\bin\test.log"]
}
}
output {
elasticsearch {
protocol => "http"
host => "10.35.143.93"
port => "9200"
index => "latestindex"
}
}
我已经在运行 elasticsearch 服务器并验证是否正在接收数据
卷曲查询。问题是,当输入为file 时,没有接收到任何数据。但是,如果我将输入更改为stdin { },如下所示,它会顺利发送所有输入数据:
input {
stdin{ }
}
output {
elasticsearch {
protocol => "http"
host => "10.35.143.93"
port => "9200"
index => "latestindex"
}
}
我不知道哪里出错了。有人可以看看这个吗?
【问题讨论】:
-
Log stash 将发送数据。仅当您更改文件时。您更改数据我是那个日志文件?
标签: file logging input elasticsearch logstash