# Incidents

An incident is the one thing a person acknowledges and resolves, whatever raised
it. Alerts and monitors open them by themselves when you ask, a person can open
one by hand, and each keeps a timeline of who did what and when.

## Opening an incident

- **From an alert or a monitor.** Switch on **Open an incident** in its form. When
  the alert fires or the monitor goes down, an incident opens; when it resolves or
  recovers, the incident resolves with it, unless a person already did. Every
  firing is its own incident, and one firing never opens two.
- **From an issue rule or an SLO.** An [issue rule](https://tailcove.dev/docs/issues#open-an-incident-for-an-issue)
  and an [SLO](https://tailcove.dev/docs/slos) burning fast can open one too.
- **By hand.** **Open an incident** on the Incidents page, for something nobody's
  alert caught. Give it a title and a severity.

Severity is **critical** (monitors going down, a new critical issue), **major**
(alerts, SLOs, an issue past its rule's threshold) or **minor**.

## Acknowledge, resolve, comment

An incident is **triggered** until someone acknowledges it, then **acknowledged**
until it is **resolved**. You can resolve one without acknowledging it. Resolved is
final: if the problem returns, that is a new incident, so the first one's history
stays true. Notes can still be added after it is resolved, for what you learned.

The timeline lists, in order, when it opened, when the notifications went out, who
acknowledged and resolved it (a person, an address that used an email link, or
Tailcove when the cause recovered), and every note.

## Links in the email

The notification email of an alert or monitor with an incident carries an
**Acknowledge** button and a link to resolve it. Each address gets its own pair:

- it works once, for 24 hours, and only for that incident;
- opening it shows what it will do, and a button does it, so a mail scanner that
  opens the link changes nothing;
- the timeline records the address (and the person, when it belongs to a team
  member).

Other channels (Slack webhooks, Discord, generic webhooks) are shared rooms with no one recipient,
so they carry no links: open the incident in Tailcove. Two exceptions: the [Slack app](https://tailcove.dev/docs/notifications/slack-app)
posts the incident with Acknowledge and Resolve buttons that act as the person who presses them, and a
[Teams](https://tailcove.dev/docs/notifications/teams) card has link buttons.

## The status page

**Publish** on an incident posts it on your [status page](https://tailcove.dev/docs/status-pages) with a
title and message you write (the incident's own title is internal and may name
things customers should not read). From then on acknowledging posts "Identified"
and resolving posts "Resolved" as updates, and you can email the page's
subscribers with each one. Notes are never copied. It counts towards your plan's
status page announcements.

## How long things take

The Incidents page shows the median time to acknowledge and to resolve over the last
30 days (like the response report, a median, so one slow incident does not distort it),
how many incidents started each week over the last 13 weeks, and each incident shows its
own. An incident's page also lists the deploys recorded in the two hours before it started
(see [Deploys](https://tailcove.dev/docs/api/deploys)): of the alert's, issue rule's or SLO's source, or of every
source when it was opened by a monitor or by hand.

## Who can see them

Every team member except one restricted to some client groups: an incident can be
about any source or monitor, so it cannot be narrowed to a group. Open incidents
also show under "Needs attention" on the dashboard and in the bell.

## Post-mortems

Once an incident is resolved, **Write the post-mortem** on its page starts a document with a summary, the impact, a timeline, the root cause and action items.

- **The timeline starts from the facts.** It is filled in from what the incident recorded (opened, who was paged, acknowledged, comments, resolved) with times in UTC, once, when you start. After that it is your text: correct it freely.
- **Action items** have a title, an optional owner (a team member who can use incidents) and a done box.
- **Everyone on the team who can use incidents may edit it.** Each save records who saved and bumps a version. If someone saved after you opened the page, your save is refused with their name and your text stays in the form, so nothing is overwritten silently.
- It is plain text; nothing in it is rendered as HTML or markdown.

## Response report

**Incidents → Response report** shows the last 90 days: incidents per week, and the median time to acknowledge and to resolve, overall, by source (the alert's source, a monitor, or "Opened by hand") and by escalation policy. Times run from the incident's start. It uses medians, so one incident that sat over a weekend does not distort the figure; an incident resolved without being acknowledged counts towards resolve time only, and an open one towards neither. Weeks start on Monday, UTC.
