# Troubleshoot Alerts and Delivery

These instructions apply to the current Admin Console.

{% hint style="info" %}
Alerts are in early access and may not be available in your account. [Contact Contextual support](mailto:help@contextual.io) to request that Alerts be enabled for your tenant.
{% endhint %}

First identify which stage failed: access, configuration, evaluation, state, routing, or delivery. Preserve the tenant, rule ID, fingerprint, timestamps, and redacted error response. Do not include webhook URLs, tokens, or signing keys in support requests.

## Alerts or an Action Is Unavailable

Check tenant selection and the availability message in the Admin Console. Paused authoring, denied access, and temporarily unavailable capability information are different conditions. The Admin Console hides Alerts navigation and blocks its page when the platform capability is not enabled. The API can still permit inspection and narrowly defined disable/delete cleanup during a known pause; consult the returned capabilities and permissions.

Check the permission for the exact operation. Reading instances does not grant rule edits; rendering templates requires rule-read permission, while validation and preview require either rule-create or rule-update plus source-data read permissions. Ask an administrator for the required scope instead of widening permissions indiscriminately.

## A Rule Cannot Be Saved

Inspect validation's `valid` and guard-rail results, even if the request returned `200`. Check duration syntax, metric/target/output support, grouping, exact-type query filters, and audit history prerequisites.

A `409` enrollment-required response means enabled metrics authoring needs a ready [background connection](https://docs.contextual.io/operate/alerts/background-metrics-access.md). Complete setup or retain a disabled draft. A `412` means a stale record hash; read and reconcile before retrying.

If template setup saved a rule but failed routing, inspect **Rules** and **Destinations → Advanced routing**. Use **Retry notification route** when the Admin Console offers it. An uncertain response is a reason to inspect state before repeating creation.

## Preview Is Unavailable or Incomplete

Check the [preview support matrix](https://docs.contextual.io/operate/alerts/validate-and-preview.md). Historical preview is unsupported for platform metrics, current-state objects, and attachments; these requests return `501`. Inspect coverage on successful previews: at most 12 complete windows are returned, even when the requested lookback is longer.

Do not treat `429`, `502`, `503`, missing evidence, or omitted windows as a successful empty timeline. Respect retry guidance and preserve the error details.

## An Enabled Rule Does Not Fire

1. Check rule evaluation status and the metrics connection. Saved configuration is not proof of successful evaluation.
2. Verify the selected source, target, population, units, and strictness of the comparator. `gt: 3` requires more than three. An attempt failure rate of 5% is `0.05`.
3. Allow for ingestion delay, complete evaluation windows, and the `for` duration. Failed reads do not advance the sustained clock.
4. Inspect history for pending state, not only the active list, which contains firing instances.
5. Check missing-data semantics. No gauge or ratio observation is not zero; a newly unseen group is not automatically created by a count rule.
6. Check whether the rule exceeded the 100-series limit and was disabled for evaluation. Narrow its scope and resolve the reported guard rail.

## An Alert Is Stale

Check whether the source object, agent, attachment, or selected series left the rule's population. Stale means the previously active series is no longer available, not that a successful observation proved recovery. Editing the query or grouping can also change the population.

## An Alert Fires but No Message Arrives

Open alert details and inspect delivery rows. Check, in order:

1. An enabled matching destination subscription exists.
2. The destination still exists and its kind/URL are correct.
3. A matching silence, recovery opt-out, or delivery suppression explains the outcome.
4. A pending attempt is still in progress, or a failed attempt has a redacted error.
5. The receiver accepts the correct payload, verifies signatures with the destination key, and acknowledges duplicates successfully.

A `notifyOnResolve: false` subscription suppresses recovery but not stale notifications. A rule's `notify: none` does not override broader subscriptions. A delivery marked sent establishes receiver acceptance, not that every downstream system completed its work.

## Generic Webhook Verification Fails

Check base64 decoding of the 32-byte key, untouched raw body bytes, exact timestamp prefix, lowercase signature syntax, clock difference, and equality between the delivery-ID header and signed body. Replacing a URL does not rotate the key. See [Verify incoming alert webhooks](https://docs.contextual.io/operate/alerts/webhook-receivers.md) for the complete contract.

## Connection Setup or Reconnect Is Pending

Refresh status and inspect the operation. Resume with its original idempotency key, input, and hash; do not start a new setup merely because HTTP returned `200` before completion. Use **Remove unused resources (N)** under **Unused connection resources** for reported old resources. Keep active credentials intact while diagnosing health or cleanup problems.

## A Lifecycle Notification Appears Without an Outcome

Read the request intent. Stop, restart, and deletion notifications report requests, not completion. Inspect the agent's actual state separately. Lifecycle events are also not eligible for terminal dismissal through the threshold dismissal API.
