We tried using heartbeat in polling some webservices endpoint and successful in ingesting the data to ELK. Also we got alerts when any WS goes down. We wanted to get one more alert when the WS is back and running. Any solution appreciated.
you need to have a watch that queries the previous watch history to gather information from the last status. Using this technique it might also be easier having one watch for each state, but that depends on the watch.
We are planning to be able to access some data of previous executions in the context, but we are not there yet.
I am not sure why you need two watches here. Let me lay out my idea (which of course may have flaws).
Create a watch with a chained input. First one getting the document that stores the state of the execution (either a get or a search by _uid), second input is doing your actually search work.
condition might be not needed at all
define two actions. First one is triggering your regular alert, second one is writing back into the state document with the current value. Every action can have its own condition, so you can only trigger the alert if a certain condition is met, but you could always write the state if needed.
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.