我的logstash配置文件如下所示:
input {
file {
path => "/home/ec2-user/apache_logs"
start_position => "beginning"
}
}
filter {
grok {
match => {
"message" => '%{COMMONAPACHELOG} %{QS}%{QS}'
}
}
date {
match => [ "timestamp", "dd/MMM/YYYY:HH:mm:ss Z" ]
locale => en
}
geoip {
source => "clientip"
}
useragent {
source => "agent"
target => "useragent"
}
}
.....
现在输入中的路径出错:
此设置必须是路径..文件不存在或无法打开
我应该在哪里放置我的apache_logs文件?
答案 0 :(得分:1)
您只需要说出目录中要查看的文件
可以通过修改file
输入来完成此操作:
input {
file {
path => "/home/ec2-user/apache_logs/*.*"
start_position => "beginning"
}
}
这将跟随/home/ec2-user/apache_logs/