Same condition is replicated with other two nodes. So if 5.6.7.8 ip is failed then im getting an alert as The Cluster with ip 1.2.3.4 is down. How can i give a condition in condition under body so that if node 5.4.3.2 fails it should alert me as The Cluster with ip 1.2.3.4 is down and vice versa.
Note:- One condition under master node 1.2.3.4 is replicated to other two nodes with same condition.
I do not really understand your requirement, but let me try to fill some of the empty voids here.
When you poll localhost, you are always polling the current master node where watcher is running currently. If you master node changes in your three node cluster, you cannot guarantee that the host with ip 1.2.3.4 is down. If you master node never changes, you will never get to know other node failures. Please take your time and read about topology of elasticsearch cluster in the the definitive guide in order to understand how all of this works. This should also make your requirement somewhat more clear and also give you the basics of Elasticsearch as a distributed system. You will also understand while having a single master node and two data nodes does not make a lot of sense.
How can i give this condition dynamically. IP should be dynamic. If data node fails also its sending alert as master's IP is down. I need a dynamic condition in body.
And i changed it from localhost to the respective IP
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.