以前,我使用过filebeat 5.4.0,并且能够通过这样修改安装服务filebeat脚本来动态设置filebeat输入路径,并且运行良好。
新服务-名称filebeat-displayName filebeat
-binaryPathName""$workdirfilebeat.exe
"-c"$workdirfilebeat.yml
"-E"filebeat.prospectors.0.paths=[
"$filebeat_put_path"]
"-path.home"$workdir
"-path.data"$workdir
">
现在,我们正计划升级到最新的ELK堆栈(v6.5.2(,但上述配置似乎不起作用。
注意:我曾尝试将"filebeat.prospectors.0.paths"更改为"filebeat.inputs.0.paths",但没有用。
最终能够通过使用以下filebeat配置的filebeat版本6.5.2来解决问题
filebeat.exe"-c"filebeat.yml"-E"filebeat.inputs.0.paths=["D:\logs\server*.log","D:\service\logs*.log"]">