Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
7.99k stars 1.73k forks source link

es_host configures multiple nodes in config.yml #3169

Closed hanjiangxue20 closed 3 years ago

hanjiangxue20 commented 3 years ago

Can es_host configure multiple nodes' IP in config.yml? I have 3 ES nodes,thanks

nsano-rururu commented 3 years ago

I don't think it can be done with the current Elast Alert. The following pull request seems to be relevant. feat: suport for multi es instances #3109

nsano-rururu commented 3 years ago

https://github.com/Yelp/elastalert/issues/2526#issuecomment-551070814

simple solution is to install a lightweight load balancer (like nginx or haproxy) and redirect your requests to your elasticsearch nodes. Just be sure your index settings are correctly spreading replicas of your shards accross your nodes because if the LB query a elastic node but doesn't contain all the data you needs, you will not see everything if the datas are spreads between the nodes

https://github.com/Yelp/elastalert/issues/1402#issuecomment-339786817

No, you don't need to install it multiple places, nor do you need to declare all the node names. All you need is direct connectivity to a SINGLE node.

https://github.com/Yelp/elastalert/issues/1364#issuecomment-332835117

Please use haproxy in front of elasticsearch . This helps to accomplish ha mode for elastalert.

https://github.com/Yelp/elastalert/issues/614#issuecomment-230896756

I recommend haproxy. It's super simple to set up a reverse proxy for Elasticsearch to do load balancing.

hanjiangxue20 commented 3 years ago

Thank you very much. I'll try