Set up a HTTP Webhook integration

Created:
March 13, 2023
Updated:
April 15, 2024

Create a custom Webhook. Setting up a Webhook integration enables you to send alert and incident notifications to the Webhook. When you create an alert or incident you will be able to select the HTTP Webhook integration you have created as the method of receiving notifications.

1. Navigate to Integrations on the FireTail platform. Select the Create integration tab.

2. Click HTTP Webhook.

3. Enter the following details.

  • In the Name of Integration field, enter a name for the integration.
  • Secret Value - Enter the secret value used to authenticate.
  • Webhook URL - Enter your HTTPS endpoint. This will be where the alert will be posted to.
  • (Optional) Edit the payload if required. This is the text and information that will be populated into the webhook notification when you get an alert. For a list of all tokens, go to Dynamic variables. Learn how to Customize notifications.

4. Click Submit.

The integration is created and listed under the existing integrations tab You can now select this integration as a notification method when you create an alert or create an incident.

Verify the Webhook

You can verify the Webhook is valid by following the below in Python.


import hmac
import hashlib

def verify_webhook(request_body, request_headers, webhook_secret):
    digester = hmac.new(bytes(webhook_secret, 'utf-8'), request_body, hashlib.sha512)
    calculated_signature = digester.hexdigest()
    if calculated_signature != request_headers.get('x-ft-sign', None):
        raise("Invalid webhook signature")
    return True