如何在 beats.yml 配置文件中为 Elasticsearch 提供多节点输出?

How to give multiple node output for Elasticsearch in beats.yml configuration file?

我的 elasticsearch 集群中有多个节点。如何将流量路由到我的 metricbeat 配置文件中的多个节点?

在你的metricbeat配置文件的Elasticsearch Output中,你可以像这样以数组格式给出多个节点输出,

hosts: ["https://IP_Node_01:9200","https://IP_Node_02:9200","https://IP_Node_03:9200"]

这提供了故障转移功能,在节点出现故障的情况下,beats 可以连接到其他节点。