Outgoing Webhooks are requests made by PagerTree to a user-defined URL, the payload provided represents an alert. Webhooks allow you to extend PagerTree by performing any logic you wish.
Create An Outgoing Webhook
- From the action button, click the “Create Integration” button.
- Supply the following information
- Name - A descriptive name
- Type - The integration type Outgoing Webhook
- Click Create button.
- On the left hand side in the options section configure the following:
Outgoing webhooks will send data in a POST request in JSON format to your configured URL. Each request has the following format:
Outgoing webhooks can also send data in a custom format. The request is still a POST request and must be in JSON format.
You can edit the format in the Template (JSON) section of the integration settings.
Templates support Handlebars substitution with the
alert objects. You can use any handlebars-helpers to support any logic. Use JSON dot notation selection to access deeply nested data (ex:
The data you have access to are the following properties:
- Plain JSON (using triple-stash operator)
- Slack (Incoming Webhook)
- Referenced objects
If for any reason you do not receive the webhook with a custom template, it is likely you have a formatting error. On the integration page, look at the integration’s logs.
- If you do not see a log, ensure the integration is enabled
- If you do see a log, view the log by clicking the log link. An error should be provided in the
statusfield in the content section on the right hand side.
Linked data is a convenience option that embeds referenced objects. Linked data will send the following extra attributes.
|Extra Attribute||Referenced By|
If you are using a custom template you can access the linked data like so:
To enable sending of linked data:
- Enable the Linked Data switch
Currently PagerTree support 7 events:
alert.created- fired exactly once, when the alert is created in the database
alert.acknowledged- fired 0-1 times, when the alert is acknowledged
alert.rejected- can be fired 0-N times, when the alert is rejected by a user.
alert.timeout- can be fired 0-M times, when an alert layer times out and moves to the next escalation layer
alert.resolved- fired 0-1 times, when the alert is resolved
alert.dropped- fired 0-1 times, when the alert is dropped
alert.handoff- fired 0-N times, when the alert is handed off
Successful Responses And Limitations
PagerTree considers any response in the 2xx family a successful response. If your endpoint sends any other response PagerTree will consider it a failure. If your endpoint consistently fails for more that 3 consecutive days, PagerTree will automatically disable your outgoing webhook integration.
Your endpoint is expected to respond within 5 seconds. If you endpoint does not respond within the timeout period it will be considered a failure.
The outgoing webhook integration will not follow redirects.