> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/data-quality-self-hosted/admin-configuration/admin-console/alerts/alert-webhook-configuration/add-webhooks.md).

# Add webhooks

This topic shows you how to add a generic webhook from the [Webhook Alerts Configuration](/data-quality-self-hosted/admin-configuration/admin-console/alerts/alert-webhook-configuration.md) page.

## Prerequisites

* You have the **ROLE\_ADMIN** role.
* You have an endpoint URL available outside of Data Quality & Observability (self-hosted) that can handle HTTP POST and PUT requests from Data Quality & Observability (self-hosted).

## Steps

{% stepper %}
{% step %}
Sign in to Data Quality & Observability (self-hosted) and click <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-268a786d787f353b92e094a60945df32bf9cb208%2FCogwheelIcon.svg?alt=media" alt="Cogwheel icon" data-size="line"> in the left navigation pane.
{% endstep %}

{% step %}
Click **Admin Console**.
{% endstep %}

{% step %}
Click **Alerts** from the list, then **Alert Webhook Configuration**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Webhook Alerts Configuration** page opens.
{% endstep %}

{% step %}
Click **Add Webhook** in the upper-right corner.\ <i class="fa-chevrons-right">:chevrons-right:</i> The Add Webhook dialog box appears.
{% endstep %}

{% step %}
Enter the required information.

<table><thead><tr><th width="152">Field</th><th>Description</th></tr></thead><tbody><tr><td>Webhook Name</td><td><p>The name you assign to a webhook to help you identify and use it in Data Quality &#x26; Observability (self-hosted). This name does not need to match the naming conventions of your systems outside Data Quality &#x26; Observability (self-hosted).</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Webhook names cannot contain spaces.</p></div></td></tr><tr><td>URL</td><td>The location where JSON payloads containing alert information are sent.</td></tr><tr><td>Method</td><td><p>The API request method to the service associated with the URL.</p><p>Select either POST (default) or PUT.</p></td></tr><tr><td>Use for Global Alerts</td><td>Optional. Enables the webhook to send a <a href="/data-quality-self-hosted/core-concepts/alerts/working-with-the-alert-builder/configuring-alert-emails.md">global failure alert</a> when a job fails at runtime.</td></tr><tr><td>Authentication Type</td><td><p>Optional. The method that the service associated with the URL uses to authenticate each API request.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Selecting an authentication type is optional. However, if you select <strong>Username/Password</strong>, the <strong>Username</strong> and <strong>Password</strong> fields are required. Currently, only the <strong>Username/Password</strong> authentication type is supported.</p></div></td></tr><tr><td colspan="2">Username/Password</td></tr><tr><td>Username</td><td>Username credential to the service associated with the URL.</td></tr><tr><td>Password</td><td>Password credential to the service associated with the URL.</td></tr><tr><td>JSON Template (optional)</td><td><p>Optional. Specify a custom JSON template for webhook alerts. This template can define both static values and replacement values. If left blank, the default payload is used. Delimiter format is <code>%%field%%</code>.</p><p>Supported template variables:</p><ul><li>dataset</li><li>run_id</li><li>alert_type</li><li>alert_name</li><li>alert_message</li><li>alert_condition</li><li>condition_value</li><li>job_status</li><li>tenant_name</li><li>dataset_score</li><li>findings_url</li><li>profile_url</li><li>alerts_url</li><li>rules_url</li><li>alert_payload. Note that alert_payload is a full JSON object.</li><li>hostname</li><li>unix_time_ms</li><li>alert_time</li><li>metatag_1, metatag_2, metatag_3, metatag_4. The numbers indicate the order of Meta Tags as shown on the <a href="/data-quality-self-hosted/core-concepts/dataset-directory/dataset-manager.md">Dataset Manager</a> page. If your template includes this variable, but no Meta Tag value exists, then the job displays as <strong>::</strong></li><li>business_unit. Note that the JSON output only includes the assigned parent object; it does not include the child objects. If your template includes this variable, but no Business Unit exists, then the job displays as <strong>""</strong></li></ul><p>For example, suppose the customer begins with the following JSON template:</p><pre><code>{
"host": "&#x3C; name of the server name from where the event is published>",
"source": "&#x3C;name of the file, stream, or other input from which a particular event originates>",
"sourcetype": "&#x3C;source type>",
"index": "&#x3C;indexname>",
"time": &#x3C;the event time in UNIX FORMAT>,
"event": {
    "msg": "&#x3C;message details >",
    "sev": "&#x3C;One of the following values : Critical | High |Medium | Low | Normal | Info>",
    "type": "&#x3C;alert type>",
    "ci": "&#x3C;application CI name starting with S.A. as in CMDB>",
    "res": "&#x3C;impacted resource>",
    "KB": "&#x3C;serviceNow KB>"
}
</code></pre><p>To create a custom template, the customer replaces the variables using the format <code>%%field%%</code>:</p><pre><code>{
   "host": "%%hostname%%",
   "source": "Collibra Data Quality",
   "sourcetype": "custom_json",
   "index": "&#x3C;indexname>",
   "time": %%unix_time_ms%%,
   "event": {
       "msg": "&#x3C;message details >",
       "sev": "&#x3C;One of the following values : Critical | High |Medium | Low | Normal | Info>",
       "type": "%%alert_type%%",
       "ci": "&#x3C;application CI name starting with S.A. as in CMDB>",
       "res": "&#x3C;impacted resource>",
       "KB": "&#x3C;serviceNow KB>",
       "alertName": "%%alert_name%%"
       "alertCondition": "%%alert_condition%%"
       "alertMessage": "%%alert_message%%"
   }
}
</code></pre><p>The customer then pastes the above template into the <strong>JSON Template (optional)</strong> field. Once run, the following JSON is sent to the defined webhook:</p><pre><code>{
   "host": "http://localhost:9000",
   "source": "Collibra Data Quality",
   "sourcetype": "custom_json",
   "index": "&#x3C;indexname>",
   "time": 1760530634,
   "event": {
       "msg": "&#x3C;message details >",
       "sev": "&#x3C;One of the following values : Critical | High |Medium | Low | Normal | Info>",
       "type": "RULE STATUS",
       "ci": "&#x3C;application CI name starting with S.A. as in CMDB>",
       "res": "&#x3C;impacted resource>",
       "KB": "&#x3C;serviceNow KB>",
       "alertName": "rules breaking RENAMED"
       "alertCondition": "score >= 0"
       "alertMessage": "Rules Breaking for Dataset XYZ"
   }
}
</code></pre><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Validation of JSON is currently not supported.</p></div></td></tr></tbody></table>
{% endstep %}

{% step %}
Click **Save**.

The webhook appears in the table on the [Webhook Alerts Configuration](/data-quality-self-hosted/admin-configuration/admin-console/alerts/alert-webhook-configuration.md) page.
{% endstep %}
{% endstepper %}

## What's next

* [Working with the Alert Builder](/data-quality-self-hosted/core-concepts/alerts/working-with-the-alert-builder.md)
* [Adding dataset alerts](/data-quality-self-hosted/core-concepts/alerts/working-with-the-alert-builder/adding-dataset-alerts.md)
