为什么 filebeat 会尝试连接到 elasticsearch?
Why does filebeat try to connect to elasticseach?
当 运行 filebeat 时,我得到以下错误:
2019-03-04T14:39:49.704Z INFO cfgfile/reload.go:205 Loading of config
files completed.
2019-03-04T14:39:50.709Z INFO pipeline/output.go:95 Connecting to
backoff(elasticsearch(http://localhost:9200))
2019-03-04T14:39:54.240Z ERROR pipeline/output.go:100 Failed to
connect to backoff(elasticsearch(http://localhost:9200)): Get
http://localhost:9200: dial tcp [::1]:9200: connectex: No connection
could be made because the target machine actively refused it.
这真的很奇怪,因为我的 filebeat 没有配置为连接到弹性搜索:
(filebeat.config)
filebeat.inputs:
- type: log
enabled: true
paths:
- C:\my_Logs\*
output.logstash:
hosts: ["localhost:5044"]
我不明白为什么会这样,none 我所遵循的教程中提到 elasticseach 作为一项要求,也没有任何示例配置文件显示任何配置位置的人。
为什么会发生这种情况,我该如何禁用此功能?
原因很可能是您的 filebeat 实例没有加载您认为的配置。
默认的filebeat.yml有这些行:
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
请检查您的配置文件。
更新: 此外,filebeat 有一个命令行选项,允许您导出当前配置。如果您不确定它看到的是什么配置,这会很有用:
sudo filebeat export config
Link 至当前文档:https://www.elastic.co/guide/en/beats/filebeat/current/command-line-options.html#export-command
当 运行 filebeat 时,我得到以下错误:
2019-03-04T14:39:49.704Z INFO cfgfile/reload.go:205 Loading of config files completed. 2019-03-04T14:39:50.709Z INFO pipeline/output.go:95 Connecting to backoff(elasticsearch(http://localhost:9200)) 2019-03-04T14:39:54.240Z ERROR pipeline/output.go:100 Failed to connect to backoff(elasticsearch(http://localhost:9200)): Get http://localhost:9200: dial tcp [::1]:9200: connectex: No connection could be made because the target machine actively refused it.
这真的很奇怪,因为我的 filebeat 没有配置为连接到弹性搜索:
(filebeat.config)
filebeat.inputs:
- type: log
enabled: true
paths:
- C:\my_Logs\*
output.logstash:
hosts: ["localhost:5044"]
我不明白为什么会这样,none 我所遵循的教程中提到 elasticseach 作为一项要求,也没有任何示例配置文件显示任何配置位置的人。
为什么会发生这种情况,我该如何禁用此功能?
原因很可能是您的 filebeat 实例没有加载您认为的配置。
默认的filebeat.yml有这些行:
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
请检查您的配置文件。
更新: 此外,filebeat 有一个命令行选项,允许您导出当前配置。如果您不确定它看到的是什么配置,这会很有用:
sudo filebeat export config
Link 至当前文档:https://www.elastic.co/guide/en/beats/filebeat/current/command-line-options.html#export-command