Set up a HTTP Webhook integration

Created:
March 13, 2023
Updated:
December 21, 2023

Create a custom Webhook.

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

2. Click HTTP Webhook.

3. Enter the following details.

  • In the My 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 more information and a list of all tokens, go to Dynamic variables.

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