如何在 logstash 配置文件中提供文件夹位置作为输入
How to provide folder location in logstash config file as input
下面是我的示例 logstash conf 文件。
input{
file{
path => "D:\Log\apacheTest.log" \here i want to give path for the folder
start_position => beginning
}
}
我尝试给出文件夹的路径,但它不解析添加到该文件夹中的文件,也尝试在路径中使用 .* 模式。
您需要这样做:
input{
file{
path => "D:/Log/*.*"
start_position => beginning
}
}
下面是我的示例 logstash conf 文件。
input{
file{
path => "D:\Log\apacheTest.log" \here i want to give path for the folder
start_position => beginning
}
}
我尝试给出文件夹的路径,但它不解析添加到该文件夹中的文件,也尝试在路径中使用 .* 模式。
您需要这样做:
input{
file{
path => "D:/Log/*.*"
start_position => beginning
}
}