> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashduty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calibre alert integration

> Send Calibre performance budget at-risk, exceeded and met notifications to Flashduty On-call through a site webhook.

Use a Calibre site webhook to send performance budget status changes to Flashduty On-call. Each budget maps to one Flashduty alert: the alert triggers when the budget becomes `At risk` or `Exceeded`, and recovers when the budget is `Met` again.

<div className="hide">
  ## In Flashduty On-call

  ***

  You can get the integration push URL in either of the following ways.

  ### Use a dedicated integration

  1. In the Flashduty console, go to **Channels** and open a channel
  2. Select **Configuration** → **Integrations** → **Private integration**, then click **Add an integration**
  3. Select **Calibre** and click **Save**
  4. Open the new integration card and copy the **push URL**

  ### Use a shared integration

  1. In the Flashduty console, go to **Integration Center → Alert Events**
  2. Select **Calibre** and enter an integration name
  3. Configure the default route and select a channel. You can add more rules under **Routes** after creation
  4. Click **Save** and copy the generated **push URL**
</div>

## Configure Calibre

***

<Steps>
  <Step title="Add a webhook">
    1. Sign in to Calibre, open the site to connect, and go to **Synthetic → Settings → Integrations → Add a webhook**
    2. Paste the full Flashduty push URL as the payload URL (Calibre sends `application/json` by POST)
    3. Select **Budget notifications**. Snapshot notifications are not alerts and can be left off; if selected, Flashduty returns success and creates no alert
    4. Click **Save**
  </Step>

  <Step title="Make sure budgets exist">
    Go to **Site → Synthetic → Budgets** and create a budget for each metric to watch (for example LCP). Without budgets there are no budget notifications.
  </Step>

  <Step title="Verify the lifecycle">
    Push a budgeted metric past its budget value and confirm Flashduty receives an active alert; when the metric is back within budget, confirm the alert recovers. Budget notifications are sent on persistent changes of the overall budget status, so wait for the next test to complete.
  </Step>
</Steps>

<Note>
  Calibre webhooks have no test button. You can also set a shared secret under **Synthetic → Settings → Integrations**; Calibre then signs each request in the `Calibre-HMAC-SHA256-Signature` header. Flashduty does not verify this signature. The `integration_key` in the push URL is the credential, so keep the URL private.
</Note>

## Payload

***

The main fields of a budget notification are parsed directly, with no template to configure:

| Field | Meaning | In Flashduty |
| :- | :- | :- |
| `id` | Budget ID | Part of the Alert Key; label `budget_id` |
| `site_id` | Site identifier | Part of the Alert Key; labels `site_id`, `resource` |
| `name` | Budget name | Alert title; labels `check`, `budget_name` |
| `abbreviated_name` | Metric abbreviation, such as `LCP` | Label `metric` |
| `status` | `At risk`, `Exceeded` or `Met` | Severity or recovery; label `budget_state` |
| `threshold` | Threshold direction, such as `GreaterThan` | Label `threshold` |
| `value` | Budget value | Label `budget_value` |
| `url` | Link to the budget page | Label `budget_url` |
| `budgets` | Status and measured value per test profile and page | Written to the alert description |

## Alert Key

***

Flashduty builds the Alert Key from the site identifier `site_id` and the budget ID `id`. At-risk, exceeded and met notifications for the same budget carry the same Alert Key and land on one alert; different budgets or sites produce different alerts. Changing the budget name, status or measured value does not change the Alert Key.

If `id` or `site_id` is missing, Flashduty returns a parameter error because a met notification could not be tied to its alert reliably.

## Status and severity

***

| Calibre `status` | Flashduty state or severity |
| :- | :- |
| `At risk` (current value within 10% of the budget) | Warning |
| `Exceeded` | Critical |
| `Met` | Recovery |

A budget notification with an empty or any other `status` is rejected, so a request whose state cannot be determined never enters the wrong alert lifecycle.

## FAQ

***

<AccordionGroup>
  <Accordion title="No budget notifications arrive?">
    Calibre does not send budget notifications by default; select Budget notifications on the site webhook. They are sent only when the overall budget status changes persistently, so nothing is pushed while the status stays the same.
  </Accordion>

  <Accordion title="Do snapshot notifications create alerts?">
    No. A snapshot notification only reports a completed test run. Flashduty returns success and creates no alert.
  </Accordion>
</AccordionGroup>

## Troubleshooting

***

* **Calibre fails to deliver**: confirm the payload URL is the full push URL and includes `integration_key`
* **Flashduty returns a parameter error**: confirm the request is a budget notification with non-empty `id`, `site_id` and `status`
* **The alert does not recover**: confirm the met notification carries the same `id` and `site_id` as the trigger

For field details, see the Calibre documentation: [Webhooks](https://calibreapp.com/docs/integrations/webhooks) and [Create a Performance Budget](https://calibreapp.com/docs/synthetic/budgets).
