Hello,World

filebeat loadbalance 负载均衡问题

Beats | 作者 hailin0 | 发布于2017年05月02日 | 阅读数:8806

原文:
-------------------------------------------
loadbalanceedit

If set to true and multiple Logstash hosts are configured, the output plugin load balances published events onto all Logstash hosts. If set to false, the output plugin sends all events to only one host (determined at random) and will switch to another host if the selected one becomes unresponsive. The default value is false.
 
output.logstash: 
  hosts: ["localhost:5044", "localhost:5045"] 
  loadbalance: true 
  index: filebeat
 
 
 
loadbalance: true 每一条message都随机负载到一个logstash上
loadbalance: false 随机选择一个logstash使用,每一次的message都发到同一个logstash,当这个logstash响应变慢的时候,就在选择一个来使用。
 
大神们指点一下是不是这个意思?
已邀请:

hailin0

赞同来自:

loadbalance: false
感觉设置为false,就像是主备的感觉呢?

hailin0

赞同来自:

我这里其实是想让同一个文件里面收集的日志,转发到同一个logstash上,因为在logstatsh上生成了行号,就是根据input的属性路由到同一个logstash

要回复问题请先登录注册