
filebeat 使用 -c 参数仍加载 etc 中配置文件的原因
在启动 filebeat 时,即便使用了 -c 参数指定自定义配置文件路径,但 filebeat 仍会尝试加载 etc/filebeat/filebeat.yml 配置文件。这是由于 filebeat 的全局标志 --path.config 默认设置为 /etc/filebeat。
-c 参数指定了相对路径,因此在加载自定义配置文件时,filebeat 将其路径与 --path.config 默认值 /etc/filebeat 拼接起来。因此,它尝试加载 etc/filebeat/filebeat.yml,即使已使用 -c 参数指定了自定义配置文件。
解决此问题的方法是明确设置 --path.config 标志,指定自定义配置文件所在目录的绝对路径。例如:
filebeat -c ./filebeat.yml --path.config /home/bot/Desktop/coder/ideaboom/test_ELK_EFK/
以上就是Filebeat 使用 -c 参数为何仍加载 etc 中配置文件?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号