Integrating Loadster with Webhooks

Webhooks are a flexible way to integrate Loadster with all kinds of applications and external systems. Basically, you can provide Loadster with a URL of your choosing, and Loadster will send an HTTP POST to it when something important happens.

At this time, webhooks are mostly of interest if you’re using Speedway, powered by Loadster, for your site and API monitoring. Anytime a Speedway monitor or fails or recovers, it will post information about the monitor cycle to a webhook endpoint of your choosing.

You can configure webhooks for your account in either Loadster or Speedway.

Enabling Webhooks in Loadster or Speedway

Go to the Integrations page of your Loadster or Speedway dashboard. Click the Enable Webhook button in the Webhook section.

You’ll be prompted for two URLs: a Monitor Fails Webhook URL to hit whenever a monitor fails, and a Monitor Recovers Webhook URL to hit when it recovers. You can enter the same URL in both of these, or different URLs. It’s up to you. If you only care about failures and not recoveries, simply leave the recovery URL blank.

Save the webhook settings. Loadster will begin sending an HTTP POST request to these URLs whenever a monitor fails or recovers, including details of the failure or recovery in the body.

Testing Your Webhooks Integration

Now that the integration is enabled, each time one of your Loadster monitors fails for the first time or after it was previously passing, Loadster will POST to the Monitor Fails Webhook URL. This usually happens within seconds but if the request fails for whatever reason, Loadster will retry it periodically until it succeeds. Your webhook endpoint must respond with an HTTP 2xx status to be considered a success.

You can test this by creating a Loadster monitor that points to an invalid location, submits invalid data, or is otherwise broken.

When the same Loadster monitor recovers, the incident will be resolved in Webhook.

Getting Help With Webhooks

We’re happy to assist you if you have any trouble integrating with webhooks. Get in touch at help@loadster.app if there’s any way we can help!