DEV Community

Artem Meleshkin
Artem Meleshkin

Posted on Originally published at pingvera.com

Send Pingvera Events to a Help Desk with Webhooks

Send Pingvera Events to a Help Desk with Webhooks

A reliable monitoring-to-help-desk integration creates one incident ticket for one confirmed failure, updates that ticket as evidence or severity changes, and resolves it only after confirmed recovery. It should not create a new ticket for every failed probe or webhook retry.

Use an HTTPS ingress, authenticate and persist the raw event, process it asynchronously, normalise fields into an agency-owned schema, deduplicate deliveries, map the incident to a ticket, and monitor the adapter itself.

Pingvera
↓ HTTPS webhook
ingress: authenticate, limit, persist
↓ durable queue
normalise + deduplicate + correlate
↓ routing/severity policy
Jira Service Management / Zendesk / Freshdesk / other help desk
↳ create, update, comment, resolve

Important implementation limitation
As of this article's review date, this workspace does not contain a public authoritative Pingvera webhook payload and signature specification. Therefore this guide does not invent product fields or headers.

Before implementation:

  1. create a controlled test endpoint;
  2. send each available Pingvera test event;
  3. capture the exact raw body and permitted headers securely;
  4. verify current authentication, signature, event types, delivery IDs, retries, and ordering in the product or official documentation;
  5. map the real payload into the internal schema below.

The JSON examples are vendor-neutral internal contracts, not Pingvera API promises.

At a glance

  1. Decide which confirmed events should create tickets.
  2. Build an authenticated HTTPS endpoint.
  3. Persist before acknowledging receipt.
  4. Respond quickly and process asynchronously.
  5. Reject unexpected event types and oversized payloads.
  6. Deduplicate by verified delivery/event ID or a documented fallback.
  7. Correlate one active incident to one ticket.
  8. Treat failure, escalation, recovery, and reopen as state transitions.
  9. Retry temporary help-desk errors safely.
  10. Use a dead-letter queue and visible operator workflow.
  11. Keep a second P1 notification route.
  12. monitor ingress, queue age, worker errors, and API limits.

Define business rules first

Do not let the webhook receiver invent business severity from one HTTP status. Use site class, journey, confirmation, scope, workaround, time, and current maintenance state.

Why an adapter is necessary

Different data models

Monitoring describes checks and states. A help desk expects client, service, queue, priority, summary, description, assignee, and lifecycle.

Delivery retries and duplicates

Networks and providers retry. The receiver must safely process the same delivery more than once.

Ordering

Do not assume events always arrive in order. Store event time and allow only valid transitions.

Help-desk outage

An event must not disappear because the ticket API returns 429 or 503.

Security

The endpoint is public infrastructure and must resist forgery, replay, oversized bodies, secret leakage, and abuse.

Secure ingress

Prefer a provider-supported HMAC signature over the raw request body, including a timestamp and delivery ID if Pingvera supports them. If not, evaluate documented alternatives such as a secret header, bearer/basic authentication, mTLS, provider-published IP ranges, or an integration gateway.

Controls:

  • HTTPS with certificate verification;
  • exact method and content type;
  • body-size and rate limits;
  • authentication before parsing expensive content;
  • constant-time signature comparison;
  • timestamp tolerance and replay detection;
  • secrets in a manager, not URL query strings;
  • redacted logging;
  • rapid 2xx only after durable persistence.

GitHub's official webhook guidance similarly recommends a webhook secret, HTTPS, delivery IDs, event filtering, quick response, and asynchronous processing. Apply the principles while following Pingvera's actual contract.

Durable inbox record

Store:

delivery_id
received_at_utc
raw_body_hash
event_type
signature_verification_result
safe_payload_reference
processing_state
attempt_count
last_error
ticket_system
ticket_id
incident_key

Sensitive raw bodies should have strict access, encryption, minimisation, and retention.

Internal normalised event

{
"schema_version": 1,
"delivery_id": "provider-delivery-id",
"event_id": "provider-event-id",
"event_time": "2026-08-08T10:15:30Z",
"event_type": "incident.confirmed",
"state": "failing",
"site_id": "WEB-0042",
"check_id": "lead-delivery",
"incident_key": "WEB-0042:lead-delivery",
"service_class": "A",
"severity": "P1",
"summary": "Lead delivery is failing",
"observations": {
"first_failure": "2026-08-08T10:13:05Z",
"regions": ["eu-west"],
"confirmation_count": 2
},
"links": {
"monitor": "https://example.invalid/replace-with-real-link",
"runbook": "https://kb.example/WEB-0042/lead-delivery"
}
}

Populate only fields supported by the captured event plus trusted inventory/policy data. Never trust a payload-supplied help-desk project or assignee without an allowlisted mapping.

Incident-to-ticket state machine

healthy
└─ confirmed failure → create/open
open
├─ repeated failure → update evidence if useful
├─ severity increase → escalate
├─ partial recovery → remain open
└─ confirmed recovery → monitoring
monitoring
├─ failure returns within window → reopen same incident
└─ stable window complete → resolve
resolved
└─ new independent failure → new incident/ticket

Define when a later failure is a reopen versus a new incident. The rule may use check ID, service, recovery window, and recurrence policy.

Ticket field mapping

Use the current official API of the selected help desk. Do not rely on field names from this table without verifying tenant configuration.

Idempotency and deduplication

Preferred order:

  1. reject already processed verified delivery_id;
  2. deduplicate logical event by event_id where defined;
  3. correlate active incident by stable incident_key;
  4. use the help desk's external ID/idempotency feature if available;
  5. after timeout, query mapping before creating again;
  6. store the ticket ID transactionally with the result.

Do not hash the complete body as the only incident key: changing timestamps can create a new hash for the same outage.

Retry policy

Classify errors:

  • 2xx: success, record response;
  • 400/422: schema or mapping defect → dead-letter, operator action;
  • 401/403: credential/permission incident → stop aggressive retry and escalate;
  • 404: project/ticket mapping may be stale → investigate;
  • 409: possible idempotency/state conflict → reconcile;
  • 429: respect Retry-After, back off;
  • 5xx/network timeout: bounded exponential backoff with jitter, then dead-letter.

Treat a create-request timeout as indeterminate until you check whether the ticket exists.

Pseudocode

receive(request):
enforce_tls_method_type_and_size(request)
verify_authentication_over_raw_body(request)
reject_replay_or_expired_timestamp(request)

if inbox.has(request.delivery_id):
return 200

inbox.persist(request.delivery_id, raw_body, safe_headers)
queue.enqueue(request.delivery_id)
return 202

worker(delivery_id):
event = normalise(inbox.load(delivery_id), trusted_inventory)
validate_schema_and_allowlisted_mapping(event)

incident = incidents.find_active(event.incident_key)
action = state_machine.decide(incident, event)

result = helpdesk.apply_idempotently(action)
persist_mapping_and_result(result)

Monitor the integration
Alert on:

  • webhook authentication failures;
  • ingress 5xx and latency;
  • queue depth and oldest message age;
  • normalisation/mapping failures;
  • help-desk authentication and rate limits;
  • dead-letter messages;
  • incidents without ticket mapping;
  • tickets still open after confirmed recovery;
  • no test event received within the expected validation period.

Test the route periodically with a clearly labelled synthetic event that cannot be mistaken for a live client incident.

P1 fallback

The help desk and adapter can fail during the same broad provider incident. A P1 should retain an independent route—phone, pager, SMS, or another approved channel. The ticket is the work record, not necessarily the only alarm.

Common mistakes

  • webhook directly creates a new ticket every time;
  • acknowledging before durable persistence;
  • trusting project/assignee from unverified payload;
  • secrets in the endpoint URL;
  • signature validation after JSON re-serialisation instead of raw body;
  • no replay or duplicate protection;
  • retrying 401 forever;
  • resolving on the first healthy probe;
  • no mapping for maintenance windows;
  • adapter is not monitored;
  • code built against guessed Pingvera fields.

FAQ

Can n8n, Zapier, or Make replace the adapter?

They can be suitable for a low-criticality prototype if they support required authentication, persistence, deduplication, retries, data handling, and observability. Evaluate the failure model before routing P1 incidents.

Should every Pingvera alert create a ticket?

No. Confirm failures and map actionable risks. Retain raw observations without turning every probe into human work.

How should recovery close the ticket?

Move to a monitoring state after confirmed recovery, validate the agreed journey for an observation window, then resolve automatically or with human approval according to policy.

What if Pingvera does not provide a delivery ID or signature?

Use only documented authentication and a carefully designed fallback deduplication scheme. Raise the residual risk; do not invent headers. Ask Pingvera support for the current supported contract.

Sources and further reading

Reviewed: 8 August 2026.

Previous: Monitoring as code for web agencies. Return to the Academy overview.

Before publishing implementation code, capture the real Pingvera webhook contract and test it against the chosen help-desk API. The architecture in this guide is ready; product-specific field mapping must be evidence-based.


Originally published at pingvera.com.

Top comments (0)