Description: Canary supports outgoing webhooks from a flock to an endpoint of your choice. This event-driven approach means you get your alerts in realtime! We support your favourite apps, such as Slack and Microsoft Teams.
In this example, we’ll post data to webhook.site, a public tool for assisting in webhook development. It’s useful to see what data is posted in the webhook, but we don’t recommend using it for production purposes. You can consume the webhook by writing a custom endpoint and hosting it on infrastructure under your control.
Note: We also support a Global Generic Webhook - see guide here
Follow the steps below to enable and set up a generic webhook on your Canary flock:
Step 1:
You will need to have an endpoint to post notifications to. We have used webhook.site as the endpoint.
Opening the website will reveal a URL to post notifications to (all information is posted in a JSON format).
Note : Copy the URL that is given.
Step 2:
Log in to your Console.
Step 3:
Select the flock you want to setup webhook notifications on.
Note: we are selecting the "Cape Town - Office" flock.
Step 4:
Click on the Gear icon at the top right of the screen.
Step 5:
- Select On to enable webhook notifications on this flock.
- Click on the Add + icon under the webhooks option.
Step 6:
Click on Add Generic.
Step7:
Paste your Unique url that you received from step 1.
Step 8:
Once saved, a notification will be posted to the webhook.site URL and alerts will now be posted here.
Webhook structure :
The structure of the JSON object is as follows: