Web Service Monitoring

Using the Web Request action we can request a response from a web server, evaluate the response, and the take action.

In this example we will check the A-Ops service, its HTTP response code along with the provided JSON status data that the API returns. In the event of failure we will trigger an email action.

Requirements

  • System integration

Steps

  1. Add Trigger trigger object to the flow
  2. Edit the trigger, name it and define its schedule i.e. 60s
  3. Add Web Request action object
  4. Edit the action, name it, set the HTTP Method to GET, the URL to https://prod-eu-west-1.a-ops.cloud/api/1.0/status, and a variable that will convert the response body to json for us to check later
  5. Add Action object, name it, and define the logic to determine the service is up based on its json response
  6. Add Email object, name it, set SMTP server details, from, to, subject, and a message in the body
  7. Lastly, join the actions together taking note that we can use link logic ( pink line ) to define an expected status code. In this case when it is not 200 then we will instantly send the email and not check the json response

Preview