# Auvik webhooks in production: duplicates, ordering, retries and timeouts

Agent skill: `npx skills add hookdeck/webhook-skills --skill auvik-webhooks` ([details](https://hookdeck.com/webhooks/auvik/skill))

This guide covers the problems Auvik webhooks can cause in production and how to handle each one. What Auvik sends and how to set up an integration is on the [Auvik webhooks](/webhooks/auvik) overview, its two notification types are on [Auvik webhook events](/webhooks/auvik/events), and the header check is on [Verify Auvik webhooks](/webhooks/auvik/verify).

## At a glance

| Problem | What to do | With Event Gateway |
| --- | --- | --- |
| [Timeouts](#timeouts) | Respond with a `2xx` first; process in a background job | Answers Auvik on arrival, then queues the alert for your service |
| [Duplicates](#duplicates) | Key on `alertId`, `alertStatusString` and `date`; make handlers idempotent | Can drop repeats before they reach your handler |
| [Ordering](#ordering) | Pair on `correlationId`; handle a clear with no trigger | Logs every alert, so you can see what arrived when |
| [Retries](#retries) | Stay available; reconcile against open alerts after an outage | Accepts alerts while your service is down, retries and replays them |
| [Choosing events](#choosing-events) | Associate only actionable alerts; route on the trigger's severity | Filters and routes alerts on the body |
| [Testing](#testing) | Accept Test Connection's body; try a safe real alert | Forwards to localhost and replays past alerts |
| [Other limits](#other-limits) | Keep the standard body; use a long random header value | Checks the header and keeps your receiver's URL stable |

## Auvik webhook timeouts and slow handlers {#timeouts}

Auvik states no timeout or success code, so respond quickly with a `2xx` and do the work afterwards.

**Why it happens:** Auvik's articles cover setup, Test Connection and troubleshooting, but not how long it waits for a response or which responses count as success. A handler that opens a ticket in another system before responding depends on that system's speed.

**Fix it in your handler:**

1. Check the header, store the alert and return a `2xx` straight away.
2. Open the ticket or page someone from a [background job](/webhooks/guides/why-implement-asynchronous-processing-webhooks).
3. If you return Auvik's external ticket fields, the response has to wait for the ticket. See [Other limits](#other-limits).

**With Event Gateway:** Event Gateway answers Auvik on arrival and queues each notification, so a slow handler doesn't hold Auvik's request open.

## Duplicate Auvik webhooks {#duplicates}

Auvik doesn't say whether it can send a notification twice, and the body has no delivery ID, so make your handler safe to run again.

**Why it happens:** With no documented delivery rules, you can't rule out a repeat. A flapping condition looks similar but isn't a duplicate: Auvik warns that a clear with no delay can leave alerts "repeatedly triggering and clearing in quick succession", and each of those is a real state change.

**Fix it in your handler:**

1. Build a key from `alertId`, `alertStatusString` and `date`, and skip a key you've already processed.
2. Make handlers [idempotent](/webhooks/guides/implement-webhook-idempotency), so resolving a resolved incident does nothing.
3. For flapping, set a clear delay on the alert in Auvik rather than filtering in your handler. With a Time Delay, Auvik waits for the clear condition to hold before it clears the alert and sends the notification.

**With Event Gateway:** Hookdeck's [deduplication](/docs/deduplication) can drop repeats based on the body fields you choose.

## Out-of-order Auvik webhooks {#ordering}

Auvik documents no ordering guarantee, so key incidents on `correlationId` and handle a clear that has no trigger.

**Why it happens:** Each state change is a separate notification. Auvik defines `correlationId` as the API identifier of the alert trigger, and in its examples the triggered and cleared notifications share it while their `alertId` and `link` values differ. A pair also isn't guaranteed. An alert with no clear condition or Auto Clear setting may need dismissing by hand, a clear delay holds the notification back, and suppression rules or maintenance windows can stop notifications altogether.

**Fix it in your handler:**

1. Key open incidents on `correlationId`, and confirm that pairing on your first real alerts, because it comes from Auvik's examples rather than a stated rule.
2. If a clear arrives with no open incident, record it, so a late trigger doesn't reopen the incident. Compare `date`, which is when Auvik detected the occurrence, in UTC.
3. Review long-open incidents against Auvik on a schedule rather than waiting for a `Cleared` that may not come.

**With Event Gateway:** Event Gateway logs every notification, so you can see what arrived when, and [replay](/docs/retries) a pair after fixing your logic.

## Auvik webhook retries {#retries}

Auvik documents no retries, so don't count on a failed notification being sent again.

**Why it happens:** Auvik's articles don't say whether a failed notification is retried, or how often, and describe no way to resend one. For alerts that stop arriving, its troubleshooting article says to check the URL, run Test Connection again and then contact support.

**Fix it in your handler:**

1. Keep the endpoint available and treat your receiver's downtime as possible data loss.
2. After an outage, compare open alerts in Auvik with your incidents, and open or close what's out of step.
3. If alerts stop with your service healthy, check the URL and Test Connection, then the notification channel, suppression rules and maintenance windows.

**With Event Gateway:** Event Gateway accepts each alert as it arrives, so your downtime doesn't depend on what Auvik does after a failure. It then [retries](/docs/retries) delivery to your service on your schedule and lets you replay any alert.

## Choosing which Auvik events to handle {#choosing-events}

The notification channel decides which alerts are sent, and `alertStatusString` tells you whether each one opened or cleared.

**Why it happens:** All the alerts on an integration feed one webhook, and every one you associate with its channel is sent. Severity isn't stable across a pair either: in Auvik's examples the trigger is `Emergency` (`1`) and its clear is `Info` (`4`), with a different `alertDescription`. Both examples carry the subject "You have a new alert!", so `subject` doesn't tell you the state.

**Fix it in your handler:**

1. Associate only the alerts someone will act on. To send different alerts to different URLs, create an integration per URL.
2. Use `alertSeverity` on `Triggered` to decide who gets paged, and treat an unknown value as the most severe.
3. Send a `Cleared` to whichever incident holds its `correlationId`, whatever its severity says.

**With Event Gateway:** [Filters](/docs/filters) can route alerts on body fields such as `alertStatusString` and `alertSeverity`, so each destination gets only what it handles.

## Testing Auvik webhooks {#testing}

Run Test Connection first, then trigger a real alert under safe conditions, because the test doesn't send an alert.

**Why it matters:** A passing Test Connection posts `{"my-api-test-field":"my-api-test-value"}` to your URL, with none of the alert fields. A handler that requires `alertStatusString` can reject it. Auvik doesn't say what makes the test pass, or whether the test carries your authentication header, so check the first request you receive. The test also doesn't exercise the notification channel, which a real alert needs.

**How to test it:**

1. Return a `2xx` for a body with no `alertStatusString`, and log it rather than treating it as an alert.
2. Associate the channel with an alert, then trigger it on a non-production device, as Auvik recommends for testing clear behaviour.
3. Restore the condition and confirm the `Cleared` reaches the same incident.
4. Post Auvik's example bodies from [Auvik webhook events](/webhooks/auvik/events) to your handler for repeatable tests.

**With Event Gateway:** The [Hookdeck CLI](/docs/cli) gives you a public HTTPS URL that forwards to localhost, with no account required: `hookdeck listen 3000 auvik --path /webhooks/auvik`. You can replay past alerts while you work on a handler.

## Other Auvik webhook limits {#other-limits}

Keep the standard body unless you have a reason to change it, and know these limits before you rely on the integration.

**Why it happens:** Each of these comes from how Auvik's integration is set up rather than from delivery.

**Fix it in your handler:**

1. **JSONata changes the contract.** An expression replaces Auvik's documented body with whatever it produces, so `alertStatusString` is gone unless it's kept. Leave the expression empty on integrations that feed your own receiver, and version the shape if you do transform.
2. **Ticket links need a synchronous response.** If the webhook response is JSON with `resourceID` (trimmed to 128 characters) and `resourceLink`, Auvik shows an External Ticket ID on the alert. The ticket has to exist before you respond, which conflicts with responding first.
3. **The header proves little about the body.** Auvik doesn't sign notifications, so a matching header proves the sender knows the value, not that the alert is unchanged, and a captured request can be replayed. Use a long random value, and rotate it on the integration and your receiver together if it may have leaked.
4. **Source IPs are published, in one place.** Auvik's [Required Service IP Whitelist](https://support.auvik.com/hc/en-us/articles/360034777511-Required-Service-IP-Whitelist) lists Webhooks among the services using its IPs, and gives `nslookup ping.auvik.com` to check them. Look there rather than copying the list, and use it alongside the header check.
5. **Organization names need standard English characters.** Auvik says webhook alerts don't respond as expected otherwise. You can change the name under Admin > Settings > Organization.

**With Event Gateway:** Choose Header authentication on the integration, which is what a Hookdeck source with the Auvik type checks. Enter the Key as the header name and the exact Value, including any `Bearer ` prefix; the name matches case-insensitively and the value exactly. [Transformations](/docs/transformations) can reshape notifications per destination, so Auvik keeps sending its standard body. Event Gateway [returns its own response](/docs/sources) rather than your service's, so `resourceID` and `resourceLink` won't reach Auvik through it. An integration that needs the ticket link should call the ticket system directly.