为什么配置了 -c 参数,filebeat 仍然读取 etc 中的 filebeat.yml?
当运行 filebeat 并指定 -c 参数时,路径中的 filebeat.yml 文件应该被加载。但是,出现权限被拒绝错误,表明 filebeat 尝试加载 /etc/filebeat/filebeat.yml。
原因在于 filebeat 的配置加载行为。根据 filebeat 文档,当使用 -c 参数时,指定的文件相对路径会从 path.config 目录开始。默认情况下,path.config 为 /etc/filebeat。因此,在给定的场景中,filebeat 尝试加载 /etc/filebeat/filebeat.yml。
为了解决此问题,可以使用 --path.config 参数来显式设置 path.config 的值。通过将此值设置为 filebeat 所在的目录(即 /home/bot/desktop/coder/ideaboom/test_elk_efk),可以确保 filebeat 加载正确的 filebeat.yml 文件。
以下是解决问题的示例命令:
filebeat -c ./filebeat.yml --path.config /home/bot/Desktop/coder/ideaboom/test_ELK_EFK
以上就是为什么使用 -c 参数后,Filebeat 仍然读取 /etc/filebeat/filebeat.yml?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号