简体   繁体   English

在Logstash Elasticsearch输出插件和Kibana中最好配置哪个Elasticsearch节点

[英]Which Elasticsearch node is better configured in Logstash Elasticsearch output plugin and Kibana

I have ELK stack with Elasticsearch, Logstash and kibana installed on 3 different instances. 我在3个不同的实例上安装了带有Elasticsearch,Logstash和kibana的ELK堆栈。

Now I want to make 3 node cluster of Elasticsearch. 现在,我要制作3个节点的Elasticsearch集群。

I will make one node as master and 2 data nodes. 我将一个节点作为主节点,将2个数据节点作为节点。

I want to know in logstash config 我想知道在logstash配置

elasticsearch {
    hosts => "http://es01:9200"

Which address I need to enter there master node or data node. 我需要在其中输入主节点或数据节点的地址。 and also if I have 3 master nodes then which address I need to write there. 如果我有3个主节点,那么我需要在那写哪个地址。

similarly in kibana , I use 同样在kibana中,我使用

elasticsearch.url: es01:9200

In cluster env which url I need to use? 在群集环境中,我需要使用哪个网址?

In general, the answer depends on your cluster data size and load. 通常,答案取决于群集数据的大小和负载。
Nevertheless, I'll try to answer your questions assuming the master node is not a data eligible node as well. 不过,假设主节点也不是符合数据要求的节点,我将尝试回答您的问题。 This means it only takes care for cluster-wide actions such as creating or deleting an index, tracking which nodes are part of the cluster, and deciding which shards to allocate to which nodes. 这意味着它仅注意群集范围内的操作,例如创建或删除索引,跟踪哪些节点是群集的一部分以及确定将哪些碎片分配给哪些节点。 For this purposes, it is very recommended to have your master node as stable and less loaded as possible. 为此,强烈建议您使主节点尽可能稳定并减少负载。 So, in your logstash config I would put the addresses of your two data nodes as follows: 因此,在您的logstash配置中,我将如下所示放置两个数据节点的地址:

elasticsearch{
    hosts => ["http://es01:9200", "http://es02:9200"]
}

This confirmation maximize performance and fault tolerance as your master do not contain data and if one node failes it will continue to work with the other. 该确认可最大程度地提高性能和容错能力,因为您的主节点不包含数据,如果一个节点发生故障,它将继续与另一个节点一起工作。

Please note that it is very recommended to have at least 3 master eligible nodes configured in Elasticsearch clusters since if you are loosing the (only) master node you loose data. 请注意,强烈建议在Elasticsearch群集中配置至少3个符合主条件的节点,因为如果您丢失(仅)主节点,则会丢失数据。 3 is to avoid split brain 三是避免脑裂

Regarding kibana, since all nodes in the cluster "knows" each other. 关于kibana,因为集群中的所有节点都“知道”彼此。 You basically can put any address in the cluster. 您基本上可以在集群中放置任何地址。 But, for the same reasons as above it is recommended to fill one of your data nodes addresses. 但是,出于与上述相同的原因,建议填写您的数据节点地址之一。

For further reading, please refer to this documentation. 要进一步阅读,请参阅文档。

Hope I have managed to help! 希望我能帮助您!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM