Filebeat 忽略 -c 参数,加载 etc 中的 filebeat.yml
当执行 filebeat -c ./filebeat.yml 时,filebeat 会尝试从指定路径(./filebeat.yml)加载配置文件。然而,在某些情况下,它可能会忽略 -c 参数并转而加载 /etc/filebeat/filebeat.yml。
这是因为 filebeat 的 -c 参数指定了配置文件的相对路径。同时,filebeat 默认将 path.config 设置为 /etc/filebeat。
因此,当使用 -c 参数时,filebeat 会将指定的相对路径追加到 path.config。例如,-c ./filebeat.yml 实际上指定了 /etc/filebeat/./filebeat.yml。
然而,由于 ./ 是当前目录的别名,因此实际加载的文件是 /etc/filebeat/filebeat.yml。这就是 filebeat 会忽略 -c 参数并加载 /etc/filebeat/filebeat.yml 的原因。
以上就是为什么 Filebeat 忽略 -c 参数,加载 /etc/filebeat/filebeat.yml?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号