2016-11-14 117 views
2

嘗試讓Filebeat與logstash一起使用。目前我得到這個錯誤:Filebeat> Logstash> ElasticSearch - 伐木工錯誤

2016/11/14 04:54:27.721478 output.go:109: DBG output worker: publish 2047 events 
2016/11/14 04:54:27.756650 sync.go:85: ERR Failed to publish events caused by: lumberjack protocol error 
2016/11/14 04:54:27.756676 single.go:91: INFO Error publishing events (retrying): lumberjack protocol error 
2016/11/14 04:54:28.782729 sync.go:85: ERR Failed to publish events caused by: lumberjack protocol error 
2016/11/14 04:54:28.782756 single.go:91: INFO Error publishing events (retrying): lumberjack protocol error 
2016/11/14 04:54:30.786983 sync.go:85: ERR Failed to publish events caused by: lumberjack protocol error 
2016/11/14 04:54:30.787017 single.go:91: INFO Error publishing events (retrying): lumberjack protocol error 
2016/11/14 04:54:34.808528 sync.go:85: ERR Failed to publish events caused by: lumberjack protocol error 
2016/11/14 04:54:34.808578 single.go:91: INFO Error publishing events (retrying): lumberjack protocol error 

有沒有人有解決方案,或許你可以指出我在正確的方向嗎?

Filebeat v5和logstash v5。

在本地執行此操作。

謝謝!

+0

你可以發佈你的filebeat和logstash配置嗎?你們有沒有在兩者之間建立任何認證? – Val

回答

7

這可能是因爲您的logstash對您的filebeat不可見。 請在節拍上輸入logstash。我開始我的logstash端口沒有31311.

input { 
    beats { 
    host => "0.0.0.0" 
    port => 31311 
    } 
} 

配置在filebeat.yml:ElasaticSearch輸出默認情況下。請評論它並取消logstash輸出配置的註釋。它應該如下所示。

output.logstash: 
    # The Logstash hosts 
    hosts: ["localhost:31311"] 

如果您在這兩者之間建立了任何身份驗證,請注意。 在完成此配置後,我能夠將我的消息看到logstash,最後看到Kibana。希望它能起作用。

+0

嘿傢伙感謝您的答案!我得到它的工作。這是一個不正確的主機和端口。 –

+0

我想問一下如何打開這個logstash端口?在logstash.yml文件中,哪裏指定了端口? – Luv33preet