Run Workflow

Create a custom alert using a Workflow with APIs defined in APImetrics

If the built-in alerting options do not suit your needs, you can use the "Run Workflow" option to call any public API you'd like - by setting up API(s) in a Workflow just like for monitoring.

The high level steps are:

  1. Create a Workflow for your webhook
  2. Add API calls to that Workflow
  3. Go to Alerting > Alerts & Webhooks
  4. Add Action (bottom section)
  5. Select the Run Workflow type, and select your Workflow

There are additional runtime variables set in the workflow that identify the API and workflow that caused the issue. You can use these to build URLs or call the APImetrics API to capture more information.

  • ALERT_CALL_ID: the ID of the APImetrics Call setup
  • ALERT_CALL_NAME: the name of the APImetrics Call setup
  • ALERT_PROJECT_ID: the ID of the APImetrics Project
  • ALERT_PROJECT_NAME: the name of the APImetrics Project
  • ALERT_LOCATION_ID: the ID of the agent that make the request
  • ALERT_RESPONSE_SIZE: the size in bytes of the response
  • ALERT_RESPONSE_TIME: the total time in milliseconds for the request
  • ALERT_RESPONSE_HTTP_CODE: the HTTP code of the result, e.g. 502
  • ALERT_RESULT: The specific error code (HTTP_SERVER_ERROR for a 500, etc)
  • ALERT_RESULT_CLASS: The class of error (FAIL, WARNING, SLOW or PASS)
  • ALERT_RESULT_ID: the ID of the API result
  • ALERT_WORKFLOW_ID: the ID of the workflow the API call was running in (if applicable)
  • ALERT_WORKFLOW_RESULT_ID: the ID of the workflow result that was running (if applicable)

Note you can use these in your API call as either __ALERT_CALL_ID__ or %%ALERT_CALL_ID%%