1

我是 ELK Stack 的新手。我正在尝试使用 Windows (ELK Server) 和 Vagrant Unix CentOS VM (Filebeat Shipper) 来实现它

对于初学者,我正在尝试将 Unix Syslog 发送到 ELK 服务器,看看它是如何工作的

我已将 Windows 机器上的 Logstash 的 central.conf 文件配置为

input{

beats{
    port => 5044
    }  
}

output{

stdout{ }

elasticsearch{ 
     hosts => ["http://localhost:9200"] }

  }

Unix(CentOS - 7)上的 Filebeat YAML 配置为

filebeat:
prospectors:
-
paths:
-"/var/log/*.log"
input_type: log
document_type: beat
registry: "/var/lib/filebeat"
output:
logstash:
hosts: ["127.0.0.1:5044"]
logging:
to_files: true
files:
path: "/var/log/filebeat"
name: filebeat.log
rotateeverybytes: 10485760
level: debug 

Elasticsearch 和 Logstash 在我的 Windows 机器上正常运行

我现在面临以下两个问题,

1.当我尝试在 Unix 上运行 filebeat shipper 时,它给了我以下错误

[root@localhost filebeat]# filebeat -e -v -c filebeat.yml -d "*"
2016/05/08 11:07:00.404841 beat.go:135: DBG Initializing output plugins
2016/05/08 11:07:00.404873 geolite.go:24: INFO GeoIP disabled: No paths were set under output.geoip.paths
2016/05/08 11:07:00.404886 publish.go:269: INFO No outputs are defined. Please define one under the output section.
Error Initialising publisher: No outputs are defined. Please define one under the output section.
2016/05/08 11:07:00.404902 beat.go:140: CRIT No outputs are defined. Please define one under the output section.

2. 当我看到 Logstash 日志时,我发现它试图在“0.0.0.0:5044”而不是“127.0.0.1:5044”上监听 Beats 输入

{:timestamp=>"2016-05-08T16:36:07.158000+0530", :message=>"Beats inputs: Starting input listener", :address=>"0.0.0.0:5044", :level=>:info}

这两个问题是否相互关联,我该如何解决它们,有人可以帮助我并指出正确的方向以使其正常工作。

真的很感激你能提供的任何帮助。

4

1 回答 1

2

错误说:

没有定义输出。请在输出部分下定义一个。

如果您的 yaml 文件与问题中的相同,则错误。因为缩进在 yaml 中很重要。它必须是这样的:

...
output:
  logstash:
    hosts: ["127.0.0.1:5044"]
...
于 2016-05-08T20:55:53.710 回答