Skip to content

Website Change Alerts to PagerDuty: Events API v2 Relay

Send AyeWatch website change alerts to PagerDuty with the Events API v2: a signed relay, update_id as the dedup_key, severity per monitor, and change events that page nobody.

By AyeWatch Team6 min read

Short answer: To send website change alerts to PagerDuty, add an Events API v2 integration to a service and run a small relay that turns each signed AyeWatch alert into a trigger event, with update_id as the dedup_key. AyeWatch has no PagerDuty app, and PagerDuty cannot check AyeWatch's signature. Webhooks need a paid AyeWatch plan.

PagerDuty's Events API v2 is the endpoint monitoring tools use to open, acknowledge and resolve alerts on a service. Each event carries the integration's 32-character key as routing_key, an event_action, and a payload with a summary, a source and a severity.

When a page change deserves a page

AyeWatch is not an uptime monitor. It reads public pages and reports what changed in their content, which is a different job; uptime monitoring vs change detection explains the split. A few page changes are still worth waking someone for:

  • A payment or cloud vendor's public status page adds an incident that affects your product.
  • A security advisory page lists a new advisory for software you run.
  • A regulator or a partner posts a notice with a deadline measured in hours.

Keep that list short. Everything else belongs in Slack, email or the change events described below, or your on-call team will learn to ignore AyeWatch. The alert fatigue guide covers how to cut the rest.

How the pieces fit

The relay posts to https://events.pagerduty.com/v2/enqueue. PagerDuty's docs list the required fields: routing_key (the integration key), event_action (trigger, acknowledge or resolve), and in payload a summary of up to 1,024 characters, a source and a severity of critical, error, warning or info. PagerDuty answers 202 Accepted.

AyeWatch's payload has none of those fields and PagerDuty cannot check the X-AyeWatch-Signature header, so the relay checks the signature and maps the fields. A made-up alert from a status page monitor:

{
  "topic_id": 8330,
  "topic_name": "https://status.quillpay.example",
  "update_id": 141902,
  "headline": "QuillPay reports failing card authorizations in the EU region",
  "content": "The status page lists a new incident: card authorizations in the EU region are failing for some merchants. QuillPay says a fix is in progress.",
  "created_at": "2026-12-07T10:02:00Z",
  "evidence": [
    { "quote": "Degraded performance: EU card authorizations", "source_url": "https://status.quillpay.example" }
  ]
}

Sample rule: Alert me when the QuillPay status page adds an incident or a maintenance notice that affects card payments or payouts. Ignore resolved incidents and notices for other regions.

The relay

Store AYEWATCH_SECRET and PD_ROUTING_KEY as Worker secrets. CRITICAL_TOPICS is a comma-separated list of AyeWatch topic IDs, such as 8330,8331, that should page as critical; everything else goes in as a warning.

export default {
  async fetch(request, env) {
    // 1. Check X-AyeWatch-Signature against the raw request bytes.
    const raw = await request.arrayBuffer();
    const header = request.headers.get("x-ayewatch-signature") || "";
    const hex = header.startsWith("sha256=") ? header.slice(7) : "";
    if (!/^[0-9a-f]{64}$/i.test(hex)) return new Response("Bad signature", { status: 401 });
    const sig = new Uint8Array(hex.match(/../g).map((h) => parseInt(h, 16)));
    const key = await crypto.subtle.importKey(
      "raw",
      new TextEncoder().encode(env.AYEWATCH_SECRET),
      { name: "HMAC", hash: "SHA-256" },
      false,
      ["verify"]
    );
    if (!(await crypto.subtle.verify("HMAC", key, sig, raw))) {
      return new Response("Bad signature", { status: 401 });
    }

    // 2. Skip an update that was already delivered (SEEN is an optional KV namespace).
    const e = JSON.parse(new TextDecoder().decode(raw));
    const id = String(e.update_id);
    if (env.SEEN && (await env.SEEN.get(id))) return new Response("Already sent");
    const title = e.headline || e.topic_name;
    const link = e.evidence && e.evidence[0] ? e.evidence[0].source_url : "";

    // 3. Send a trigger event. The same dedup_key keeps a retry on the same alert.
    const critical = (env.CRITICAL_TOPICS || "")
      .split(",")
      .map((s) => s.trim())
      .includes(String(e.topic_id));
    const res = await fetch("https://events.pagerduty.com/v2/enqueue", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        routing_key: env.PD_ROUTING_KEY,
        event_action: "trigger",
        dedup_key: "ayewatch-" + id,
        payload: {
          summary: title.slice(0, 1024),
          source: e.topic_name,
          severity: critical ? "critical" : "warning",
          custom_details: { update: e.content, monitor_id: e.topic_id, trigger: e.trigger },
        },
        links: link ? [{ href: link, text: "Source" }] : [],
      }),
    });
    const ok = res.ok;

    if (!ok) return new Response("Destination refused", { status: 502 });
    if (env.SEEN) await env.SEEN.put(id, "1", { expirationTtl: 1209600 });
    return new Response("OK");
  },
};

The dedup_key does the dedupe work here. PagerDuty applies an event with a matching dedup_key and the same routing_key to the alert that is already open, so a retried delivery does not open a second alert. The key can be up to 255 characters. PagerDuty's docs say a 400 means invalid JSON that should not be retried, while 429 and 5xx answers should be retried. The relay answers 502 for any refusal, and AyeWatch retries with exponential backoff, up to 10 attempts.

Change events for alerts that should not page

PagerDuty also takes change events at https://events.pagerduty.com/v2/change/enqueue. They give responders context and do not send notifications. They appear in the service's activity, on incident details and on the recent changes page. Only routing_key and payload.summary are required, and links is the one context field they support. A body built from the same alert:

{
  "routing_key": "YOUR_32_CHARACTER_INTEGRATION_KEY",
  "payload": {
    "summary": "QuillPay changes its payout schedule page",
    "source": "https://status.quillpay.example",
    "timestamp": "2026-12-07T10:02:00Z"
  },
  "links": [{ "href": "https://status.quillpay.example", "text": "Source" }]
}

Send monitors such as a vendor's changelog or a deprecation page here. When an incident opens later, the on-call person sees that the vendor changed something an hour earlier. Change events cannot go to ruleset integration keys, which start with R.

What this setup won't do

  • Resolve the alert. AyeWatch reports new content. It sends no "all clear", so the responder resolves the incident in PagerDuty.
  • Detect a site going down. A page that stops loading is an uptime problem. Use an uptime tool for that, and AyeWatch for what a page says.
  • Beat the schedule. A change reaches PagerDuty after the next check: hourly on Pro, ASAP mode on Pro+.
  • Read pages behind a login. AyeWatch reads public pages and cannot sign in. A vendor status page inside a customer portal is out of reach.

Cost and a credit budget

Webhooks need a paid plan, trial included. AyeWatch Pro is $9/mo with 50 topics and hourly checks; Pro+ is $19/mo with 200 topics and ASAP mode. Every plan starts with a 7-day free trial.

A web page monitor costs 1 credit a check. One vendor status page checked hourly is 1 × 720 = 720 credits a month, more than Pro's 500 and well inside Pro+'s 1,500. Add a monitor with two security advisory pages every 3 hours, 1 × 240 = 240 credits, and the total is 960. For the fastest checks, Pro+ adds ASAP mode; keep it for the one or two monitors that page someone. PagerDuty's own plans decide who gets paged and how, so check its pricing page.

Wire AyeWatch into PagerDuty

  1. In PagerDuty, open the service that should receive these alerts, add an Events API v2 integration and copy its integration key.
  2. Deploy the relay with PD_ROUTING_KEY, and list the topic IDs that should page as critical in CRITICAL_TOPICS.
  3. Create the monitor in AyeWatch with a narrow rule: name the page and the kind of notice that matters.
  4. Open Notification settings, Webhook in AyeWatch, paste the relay URL and select Save Webhook. Reveal the signing secret and store it as AYEWATCH_SECRET.
  5. Wait for a real update, then check the alert in PagerDuty and acknowledge it.
  6. Move any monitor that should not wake people to change events, Slack or email.
AyeWatch fieldEvents API v2 fieldNote
Your settingrouting_keyThe 32-character integration key
Fixed valueevent_actiontrigger
update_iddedup_keyayewatch- plus the ID, up to 255 characters
headline (or topic_name)payload.summaryUp to 1,024 characters
topic_namepayload.sourceThe page URL for a web page monitor
topic_id via CRITICAL_TOPICSpayload.severitycritical, error, warning or info
content, topic_id, triggerpayload.custom_detailsShown on the alert
evidence[0].source_urllinks[0].hrefOpens the source page

Start a monitor in under a minute

Describe a topic or paste a URL. Cancel before the trial ends and you pay nothing.

Try it free for 7 days

The bottom line

Pick the one public page that has caused you an incident before and point a monitor at it. Send it to PagerDuty as a warning for two weeks, then decide whether it earns critical.

FAQ

Can AyeWatch send alerts to PagerDuty directly?

No. PagerDuty's Events API v2 needs a routing_key, an event_action and a payload with summary, source and severity. A relay or an automation tool maps AyeWatch's webhook into that shape.

How do I stop AyeWatch retries from opening duplicate PagerDuty incidents?

Use the AyeWatch update_id as the dedup_key. PagerDuty applies an event with the same dedup_key and routing_key to the alert that is already open.

Do PagerDuty change events notify anyone?

No. Change events add context to a service's activity and to incidents, and they do not send notifications. Use them for page changes that should not page someone.

Is AyeWatch an uptime monitor for PagerDuty?

No. AyeWatch reads public pages and reports what their content says. It does not test whether a site is up, so pair it with an uptime tool.

Which AyeWatch plan works for on-call alerts?

Any paid plan can send webhooks. Pro checks as often as hourly, and Pro+ at $19/mo adds ASAP mode, the fastest checks.

website change alerts to pagerdutypagerduty events api v2 webhook relaypagerduty alert when a web page changespagerduty change eventsvendor status page alerts pagerduty

Related articles