Incidents
What an incident is in Wardn, where incidents come from, how they link to the release that caused them, how to mitigate and resolve one, how they unlock a break-glass restore, and who can see and change them.
An incident is something wrong in production that a person is running down. It has a number (INC-12), a severity, a status, and the deployments it affects, so the question "what changed?" starts from the right place.
| Part | Meaning |
|---|---|
| Severity | Sev 1 (the worst) to Sev 4. Wardn-raised incidents are Sev 2 or Sev 3. A PagerDuty incident takes its severity from its priority (see PagerDuty). |
| Status | Open (people are working out what is wrong), mitigated (the harm has stopped, the cause is still being fixed) or resolved. |
| Source | wardn (Wardn raised it) or pagerduty (Wardn mirrors it). There is no other source and no way to open one by hand. |
| Affected deployments | Each deployment the incident touches, with the snapshot it was running when the incident was linked to it, and since when. |
| Cause | For an incident Wardn raised, the release and the snapshot that caused it, and a line saying why (R-140 wave 3 checks). |
| Commander | The member running it: the person who raised the release, or the person a PagerDuty incident is assigned to. |
| Timeline | The Activity entries about the incident: opened, mitigated, resolved, and what agents did. |
An incident comes from one of two places:
- Wardn raised it. The cause is in the incident ("from R-140 wave 3 checks").
- PagerDuty raised it and Wardn mirrors it. See PagerDuty. Connecting any other incident tool is not built.
Where to find them
Open Incidents in the sidebar. The list has the columns Incident, Severity, Affects, Agent work, Status and Started, a search over titles, services and sources, and filter chips: Open, Mitigated, Resolved, My teams, From Wardn and From PagerDuty. The line under each title says where it came from ("Wardn · from R-140 wave 3 checks", "PagerDuty · Dana Okafor"). An incident that is not on a deployment you can read is not listed.
Choose one to open it. The page shows its severity, status, number, source, how many deployments it affects, the commander and when it started, then Likely cause, Affected (each deployment, its health, the snapshot it runs and since when), Fixes, Agent work and the Timeline. Mark resolved needs incident:manage; a PagerDuty incident also has Open in PagerDuty.
Likely cause, Fixes and Agent work are filled by agents that read the incident and report. They only read and propose; Wardn carries out a fix only after a person approves it. See Agents.
When Wardn raises one itself
Wardn opens an incident without being asked in two cases.
| Cause | Incident | Severity |
|---|---|---|
| A release wave fails its checks, or its deployments do not come up | R-140 wave 3 failed its checks / R-140 wave 3 did not come up, linked to the release and its snapshot, on the deployments of that wave | Sev 2 if any of them is in a production environment, otherwise Sev 3 |
| A release fails | R-140 failed, on every deployment it went to | The same |
| A production deployment drifts from the snapshot it runs | api-prod drifted from its snapshot, on that deployment | Sev 3 |
"Production" means the environment's class is production, not its name.
Raising is idempotent per cause: one incident is open for a given release wave or a given drifting deployment, however many times the event is delivered, however many times a wave fails again after a retry, and however many workers see it at once. When the drift is gone, the incident Wardn opened for it resolves itself. After an incident is resolved, the same cause failing again opens a new one rather than reopening the old.
A release that a person paused is not an incident. Drift in a development or staging environment is not one either; it is on the deployment's timeline.
What an agent found
An agent can read an incident for you. When an incident opens, Wardn looks for a triage rule for its severity (Agent jobs). If the rule names an agent, Wardn starts a triage job: the agent runs in a sandbox, reads the incident, the deployments it touches, their logs and their timelines, and reports what it thinks is wrong. Opening the same incident twice starts one job, an incident with no rule is left to people, and an agent that is paused or has been removed starts nothing and holds nothing up.
A person can also start a job on an incident (an RCA, or a triage again) and cancel one that is running; both need incident:manage on the incident and the agent's own roles to read it. An agent only reads and reports here. It cannot change the incident, mitigate or resolve it, raise or pause a release, or change a cluster.
The incident page shows:
- Likely cause: the conclusion of the newest finished RCA job, or, when there is none, of the newest finished triage. It carries how sure the agent was (0 to 1), the job it came from and links to its evidence: a Wardn page, such as a release or a snapshot compare, or an outside one.
- Agent work: every job about the incident, newest first, with the agent, the kind, its status and the first sentence of what it concluded. A job that ended without a result says why:
timed_out,agent_paused,no_resultand the other reasons. - Fixes: the changes agents have proposed for this incident, with their state. This is a list of remediations: a person approves each one, and Wardn makes it. A fix that is only a proposal is not a fix yet.
The same fields are on GET /api/v1/incidents/{incidentId} as likelyCause, agentJobs and fixes. They are visible to whoever can read the incident.
A finished job is a claim, not a fact. Read the evidence before acting on it, and treat a low confidence as a prompt to look yourself.
Post to PagerDuty
For an incident PagerDuty raised, a person can post a finished job's summary (the likely cause, the confidence and the evidence) as a note on the PagerDuty incident:
curl -fsS -X POST "$WARDN_API_URL/api/v1/incidents/INC-12/pagerduty-notes" \
-H "Authorization: Bearer $WARDN_TOKEN" -H 'Content-Type: application/json' \
-d '{"jobId":"'"$JOB_ID"'"}'It needs incident:manage on a deployment the incident affects (or on the organization, if it affects none), writes an Activity entry, and is the one thing Wardn writes to PagerDuty from an agent's work: it never acknowledges, resolves, reassigns or pages. The note is posted as the person who asks, so PagerDuty must know their email address, and the connection's key must be allowed to add notes. The job must be about this incident and must have reported a result. There is no button for it yet; it belongs on the agent job page.
The release that caused it
An incident raised for a release carries that release and its snapshot (releaseId and snapshotId in the API) and a cause line, so you can go from "checkout is failing" to "R-140 wave 3, snapshot 7c1f0a2" without searching. Its affected deployments are the ones in the failing wave (or every target, for a release that failed as a whole), each with the snapshot it ran when the incident was raised, which is the "before" to compare with. Use Compare snapshots to see what the cause changed, and Releases for the release itself. A drift incident carries the snapshot the deployment is meant to run, with the number of resources that differ in its summary.
An incident mirrored from PagerDuty has no release, because PagerDuty does not know about Wardn's releases. What it carries is the service that mapped to each deployment, and what that deployment was running at the time. The timeline of the deployment shows what shipped just before.
Mitigate and resolve
curl -fsS -X POST "$WARDN_API_URL/api/v1/incidents/INC-12/mitigate" -H "Authorization: Bearer $WARDN_TOKEN"
curl -fsS -X POST "$WARDN_API_URL/api/v1/incidents/INC-12/resolve" -H "Authorization: Bearer $WARDN_TOKEN"Only an open incident can be mitigated; only an open or mitigated one can be resolved. Asking twice, or two people resolving at the same moment, resolves it once; the second is told it is already resolved. Each change writes an Activity entry (incident.mitigate, incident.resolve), and the incident's timeline is those entries. The web app has Mark resolved; mitigating is done with the API.
For an incident mirrored from PagerDuty, marking it mitigated or resolved changes it in Wardn only. Wardn never acknowledges or resolves in PagerDuty, and the mirror never undoes what a person did here: an incident you mitigated stays mitigated while PagerDuty still says it is open.
Incidents in a restore: break-glass
An open Sev 1 or Sev 2 incident is what lets someone restore a snapshot past the guardrails that govern restores. In the restore dialog, put the incident in Linked incident (INC-12) and choose Link; the dialog says whether it counts. A Sev 3 or Sev 4 incident, a mitigated or resolved one, or one that does not exist does not. Someone who holds restore:bypass then restores with a reason, and Activity marks the restore breakGlass with the incident. A restore.break_glass event is emitted for the Slack routes; it is not posted to a channel yet. Linking an incident also satisfies the sample rule "Production needs one approver unless an incident is linked" by itself, without a bypass.
This is the way back during an outage when the snapshot you need is older than the guardrail allows, or never ran on that deployment. The steps are in Restore safely during an incident; the rules are in Restore and rollback.
Who is told
When an incident opens at Sev 1 or Sev 2, the members of the teams that own the affected deployments get an Incident notice in their inbox. A Sev 3 or Sev 4 incident does not notify anyone; it is on the Incidents page and the deployment. Incidents are not posted to Slack channels today: the Slack routes carry approvals, bypass requests, releases and break-glass restores.
Who can see and change them
| Permission | Lets you |
|---|---|
incident:read | See an incident that touches a deployment you can read |
incident:manage | Mitigate and resolve an incident that touches a deployment you can manage |
People hold them through the roles they already have on a place: every member of a team can read the incidents on the team's deployments, and the owners of a cluster, environment, app or deployment, and the team's leads and owners, can mitigate and resolve them. An incident that touches no deployment is visible to, and managed by, whoever holds the permission on the whole organization. An incident on deployments you cannot read does not exist as far as the API is concerned (404, not 403).
The API
| Operation | Does |
|---|---|
GET /api/v1/incidents | List. Takes status (repeat it), source (wardn or pagerduty), mine=true (incidents on deployments you can manage), sort (recent, the default, or severity) and the usual limit and cursor. The answer carries the count in each status for the chips. |
GET /api/v1/incidents/{id} | One incident with its affected deployments, the snapshot each was running, and its timeline. The id is the incident's id or its number, INC-12. |
POST /api/v1/incidents/{id}/mitigate | Open to mitigated. incident:manage. |
POST /api/v1/incidents/{id}/resolve | Open or mitigated to resolved. incident:manage. |
POST /api/v1/incidents/{id}/pagerduty-notes | Post a finished agent job's summary as a note on the incident's PagerDuty incident, as the person who asks. A PagerDuty incident only. See PagerDuty. |
# Everything open or mitigated, worst first
curl -fsS "$WARDN_API_URL/api/v1/incidents?status=open&status=mitigated&sort=severity" \
-H "Authorization: Bearer $WARDN_TOKEN" | jq '.counts, (.items[] | {ref, title, severity, status, source})'Rules that read incidents
The policy engine's incident.open_count and incident.recent_count facts are the incidents recorded where a request lands: how many are open on the deployment now, and how many opened or resolved in the last day. A guardrail that holds production releases during an open incident, or a pipeline stage that requires no open incident, reads these.
When incidents are mirrored from PagerDuty, the count is only as good as the mirror. If PagerDuty is connected and its last read failed, is older than five minutes, or the integration is paused, the facts are unknown and the rule waits rather than passing on a count that may be missing the incident that matters. See Integration health.
Restore guardrails read one more: incident.linked_open_sev, the severity of the open incident linked to the restore, which is how "unless an incident is linked" is written.
Next
PagerDuty
Mirror incidents, map services to deployments, and fill on-call groups from schedules.
Connect an incident source
PagerDuty to incidents and on-call, start to finish.
Restore safely during an incident
Break-glass past the restore guardrails.
Agents
Triage, root-cause analysis and proposed fixes for an incident.
Restore and rollback
Go back to an earlier snapshot, with a preflight that checks images, secrets and the target first, and an automatic rollback when a job fails.
Overview and delivery metrics
What the Overview's delivery, incident and agent numbers mean, how each is worked out from facts Wardn records, which range and filters apply, and how fresh they are.