Setting Webhook Notifications
Webhooks enable automated notifications to external systems when an AI alert fires within Conviva. Webhooks push alert information via HTTP POST requests to a destination webhook URL that is a destination endpoint on your server.
Use webhooks to integrate Conviva alert events into external applications, such as displaying Conviva alerts in an alert aggregation system or triggering workflows in other applications, such as JIRA or other support ticket applications.
This topic helps you with:
Adding Webhooks
Only Admin users can add webhooks and customize alert payloads.
Prerequisites
To get started with webhooks, create a webhook destination URL on your server. This URL will receive the webhook POST requests. The destination webhook URL must be a REST endpoint that provides an HTTP 2xx status code response when the request is successfully processed. The content type of the response payload can be application/json, XML, or other accepted formats.
To add a webhook
-
In the Settings menu click Webhooks to display the Webhooks page.
-
Click the Add Webhook button.
-
Enter a name for the webhook.
The name must be 3 to 256 characters and begin with an alphanumeric character. The webhook name is displayed in the notification email when a failure occurs, so use names that can help identify the related alert.
-
Enter the email addresses to notify users when an issue occurs with the webhook notification.
-
Enter the webhook URL to which Conviva will post data.
-
Configure AI Alerts payload.
Optionally, select the URL authentication method and enter a username/password or authentication token.
Note: Username and password are encrypted in Conviva's system.
-
To view the standard AI alert payload key/value pairs, click View Standard Fields. For an explanation of the JSON structure, see Setting Webhook Notifications. If AI alert severity is enabled, the severity level of the alert is passed in the payload.
-
To add custom key/value pairs, click Add Custom Field(s), and enter the custom key and value fields.
-
Click Test Webhook to send test payload data to the webhook URL. Rerun the test whenever the webhook payload type or content changes. Validation confirms that:
-
Webhook URL is reachable.
-
Webhook URL can receive the payload data.
-
A response with an HTTP 2xx status code is received.
-
A valid response indicates that the webhook URL is operational.
To display the sent request and received response
-
Click Show More. Verify that the configured custom key/value pairs and customized key names appear in the request and response.
If the test is not successful, an error response appears. Fix the error based on the status code and re-test the URL.
- Status code 401: Re-enter the credentials. The entered credentials were not passed or invalid.
- Status code 422: Contact Conviva. An invalid attribute or decoding exception occurred.
- Status code 503: Check the webhook URL. The webhook connection failed to establish a new connection.
-
Click the Add Webhook button to configure the webhook.
After testing a webhook, you need to clear the webhook checkbox to make any additional changes to the payload settings.
Managing Webhooks
Only Admin users can add, edit, disable, remove webhooks and customize alert payloads.
To manage webhooks:
-
Click the Action icon for a webhook on the Webhooks page:
- Disable: Stop posting webhook data, while the webhook configuration is maintained in the system.
- Enable: Re-activate a disabled webhook.
- Edit: Modify the webhook settings or data.
- Delete:Remove all webhook configuration from the system.
- History: Display a change history log of the webhook modifications.
-
To add additional webhooks, click the Add Webhook button and enter the required data. See Setting Webhook Notifications for the detailed configuration steps.
Troubleshooting Webhooks
Retry Behavior
If a webhook POST request does not return an HTTP 2xx Success code, the webhook follows this retry behavior and resends the POST until an HTTP 2xx Success response is received or the last retry is reached.
Attempt |
Approximate Timing |
1 |
As soon as possible after the original event |
2 |
10 seconds after most recent failure |
3 |
15 seconds after most recent failure |
4 |
90 seconds after most recent failure |
5 |
180 seconds after most recent failure. |
After the webhook URL is disabled, admin access is required to enable the webhook URL within Conviva Video to re-start external webhook notifications when alerts fire.
Troubleshooting
If a webhook stops working, use these troubleshooting tips to help fix the issue.
- Verify the webhook status on the Webhooks page. If an Error status is displayed, click the Error link to display more information about the error.
- For HTTP status code 401, verify that the username/password or token are valid. Authorization changes may have occurred on the server hosting the destination URL.
- For HTTP status code 422, an unexpected processing error occurred with the webhook. Contact Conviva Support for assistance.
- For HTTP status code 503, the server hosting the destination URL may be down or unreachable. Verify connectivity to the destination server.
If the initial webhook is unreachable, make sure the Conviva IP addresses are whitelisted to allow network and firewall access. Contact your Conviva representative for a list of the required Conviva IP addresses.
Example Webhook Payload Formats
Refer to these examples for Webhook payload formats for AI and alerts.
Example Webhook Format for ECO AI Alerts
{
"source": "Conviva",
"version": "1.0.0",
"alert_source": "AI Alert",
"event_id": 1457888888,
"account_name": "Test",
"root_cause": "iOS Native Player and iOS",
"cumulative_impacted_unique_devices": 1,
"diagnostic_report_url": https://pulse.conviva.com/alerts/1457888888,
"metric_name": "Average Payload Time",
"alert_time": "02:45 Jan 18, 1970 PST",
"value": "15 sec",
"severity": "info",
"custom_fields": {
"runbook_url": http://test.com }
}
Key (listed alphabetically) | Editable | Availability | Description |
---|---|---|---|
"account_name" |
No |
Always included. |
Indicates the name of the account for which this alert is firing. |
"active plays" |
No |
Only included for Rebuffering Ratio alerts. |
Indicates the number of sessions that started playback successfully and are not closed within the given time interval. For rebuffering ratio only. |
"alert_time" |
No |
Always included. |
Indicates the time at which the alert was detected by Conviva’s monitoring system. |
"alert_source" |
No |
Always included. |
Shows the alert source as either “AI Alerts” or “Manual Alerts” depending which Conviva alert monitoring system this alert was sent from. |
"attempts" |
No |
Only included for Exits Before Video Start & Video Start Failures. |
Indicates the number of attempts that occurred from your customer base when the alert was detected. Used for Exits Before Video Start (EBVS) and Video Start Failures (VSF) only. |
"cumulative_impacted_unique_devices" |
No |
Always included. |
Indicates the cumulative number of impacted unique devices at the time the alert fired. |
"custom_fields" |
Yes |
Optional. Once set, it will always be included in the payload. |
Contains all the custom keys and custom values that you may have included when setting up a webhook. |
"diagnostic_report_url" |
No |
Always included. |
Indicates the URL through which you will be able to further diagnose the alert. |
"event_id" |
No |
Always included. |
Shows the unique ID that identifies the specific event that you are receiving for this AI alert. |
"metric_name" |
No |
Always included. |
Indicates the name of the Conviva metric that the Conviva monitoring system alerted on. |
"plays" |
No |
Only included for VST. |
Indicates the number of sessions that started playback successfully and are not closed within the given time interval. Used for Video Start Time (VST) only. |
"root_cause" |
No |
Always included. |
Indicates the root cause analysis that the Conviva Alert monitoring system identified for the specific alert condition. |
"severity" | No | Always included. | Indicates the severity level (Info, Warning, Critical) of the AI alert. Configured in the AI alert sensitivity controls. |
"source" |
No |
Always included. |
Displays the fixed value as “Conviva”. This value specifies that the source of this webhook payload is from Conviva. |
"version" |
No |
Always included. |
Format: "Major.Minor.Revision" Indicates the version number of the webhook payload that Conviva is sending. You can use this version number when writing your parsers in order to build your parser to be robust and future proof. |
Webhook Webhook Webhook