Elastalert query to es_cluster with two different node IP address
@Qmando
I have a two node ES-cluster with different IP address in each node. I need to index the data on the ES cluster. I believe in elastalert we don't have an option to add multiple host IP address in es_host: .I explored the options in google some recommended to use ha_proxy behind ES . But the problem is if I use ha_proxy the elastalert will query only one node at a time, my requirements is to make a query request to the entire es_cluster during the single query.
It would be great if Elastalert is able to use multiple nodes of ES cluster without the need of loadbalancer in front of the ES cluster. The use case is high availability.
However, the requirement of @sathishdsgithub to
make a query request to the entire es_cluster during the single query
seems to me as misunderstanding of how ES cluster works. An ES query is always sent to a single node of ES cluster, but it is processed by all ES nodes in the cluster which host primary shards of the queried indices.
Every node is a coordination node.
In the scatter phase, the coordinating node forwards the request to the data nodes which hold the data. Each data node executes the request locally and returns its results to the coordinating node. In the gather phase, the coordinating node reduces each data node’s results into a single global resultset.
Reference : https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html