为什么filebeat尝试连接到elasticsearch?

问题描述 投票:0回答:1

运行filebeat时出现以下错误:

2019-03-04T14:39:49.704Z INFO cfgfile / reload.go:205配置文件加载完成。 2019-03-04T14:39:50.709Z INFO pipeline / output.go:95连接到退避(elasticsearch(http://localhost:9200))2019-03-04T14:39:54.240Z ER​​ROR pipeline / output.go:100无法连接到退避(elasticsearch(http://localhost:9200)):获取http://localhost:9200:拨打tcp [:: 1]:9200:connectex:无法建立连接,因为目标计算机主动拒绝它。

这真的很奇怪,因为我的文件节点没有配置为连接到弹性搜索:

(filebeat.config)

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - C:\my_Logs\*



output.logstash:
  hosts: ["localhost:5044"]

我无法理解为什么会这样,我所遵循的教程都没有提到elasticseach作为要求,也没有任何示例配置文件显示任何配置位置的人。

为什么会发生这种情况?如何禁用此功能?

logstash elastic-stack filebeat
1个回答
2
投票

原因很可能是你的filebeat实例没有加载你认为它的配置。

默认的filebeat.yml有这些行:

output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["localhost:9200"]

请检查您的配置文件。

更新:此外,filebeat有一个命令行选项,允许您导出当前配置。如果您不确定它看到的配置,这可能很有用:

sudo filebeat export config

链接到当前的文档:https://www.elastic.co/guide/en/beats/filebeat/current/command-line-options.html#export-command

© www.soinside.com 2019 - 2024. All rights reserved.