WebSite up down status

Hi,

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.

Regards,
Raj

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.

Thanks for the suggestion. I tried but I'm stuck at a point where I couldn't compare against previous history. Can you explain a bit more?

The solution I have is

  1. Created a new index with two types as 'current' and 'previous' with same id as 'endpoint1'.
  2. Created two watchers with each one updating the 'current' as true/false from the heartbeats up status.
  3. Set the 'previous' as true initially.
  4. Trying to compare the 'previous' and 'current' but couldn't proceed further. This is where some suggestions would be appreciated.

Hey,

I am not sure why you need two watches here. Let me lay out my idea (which of course may have flaws).

  1. 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.
  2. condition might be not needed at all
  3. 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.

Hope this helps a bit!

--Alex

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.