Skip to content

Incidents

Alga includes a full incident management system that coordinates alerts, investigations, and team response with SLA tracking and automated escalation.

Incident Lifecycle

Incidents follow a state machine from creation through closure:

detected → triaging → active → mitigated → resolved → closed
active → cancelled (terminal)

resolved, closed, and cancelled are terminal states. Status transitions use optimistic concurrency (WHERE status IN fromStatuses), so concurrent transitions fail with a conflict instead of corrupting state. Deletion is a soft delete via a deleted_at tombstone.

See Lifecycle & States for the full state machine, transition triggers, and automatic actions.

Key Concepts

  • Detected State: Incidents start in detected state, awaiting triage
  • Triage Flow: begin-triage moves a detected incident to triaging; promote moves a triaging incident to active
  • SLA Targets: sla_target_respond_at and sla_target_resolve_at are computed from the service SLA config at creation
  • Escalation: Policy-driven multi-tier escalation. The SLA worker triggers escalation on a response breach; acknowledgement stops escalation
  • ICS Role Assignments: Formal ICS (Incident Command System) roles — commander, communicator, responder — for structured command. Users and agents can hold roles. See ICS Roles
  • Coordination: Real-time coordination messages, typed coordination tasks, and public status updates — see Coordination
  • Incident Documents: Section-based collaborative documents (current status, impact, root cause, resolution, etc.) with per-section versioning
  • IC Handoffs: Structured handoff process for transferring on-call responsibility — see Handoffs
  • Alert Linking: Alerts can be linked to and unlinked from incidents; resolving an incident cascades resolved to linked firing alerts
  • Incident Investigations: Investigations scoped to an incident with their own lifecycle; only one active investigation per incident is enforced

Creating Incidents

Incidents can be created:

  1. Manually via POST /api/v1/incidents or the Incidents page
  2. By promotionpromote creates an incident from an alert investigation/triage flow

Incident Roles

Alga uses the Incident Command System (ICS) for structured incident response — Incident Commander, Communicator, and Responder. Both users and agents can be assigned roles. See ICS Roles.

API Endpoints

Incident routes are addressed by incident_number (the human-readable unique number), not the internal UUID.

Incident Management

MethodPathAuthPermissionDescription
GET/api/v1/incidentsSessionincidents:readList incidents (filters: status, severity, service_id, commander_id, search, dates)
POST/api/v1/incidentsSessionincidents:writeCreate manual incident
GET/api/v1/incidents/{id}Sessionincidents:readGet incident with timeline, roles, linked items
PATCH/api/v1/incidents/{id}Sessionincidents:writeUpdate (title, description, severity, custom_fields)
DELETE/api/v1/incidents/{id}Sessionincidents:deleteSoft-delete incident (deleted_at tombstone)

Incident Actions

MethodPathAuthPermissionDescription
POST/api/v1/incidents/{id}/acknowledgeSessionincidents:commandAcknowledge (stops escalation, sets sla_acknowledged_at)
POST/api/v1/incidents/{id}/mitigateSessionincidents:commandMark mitigated (sets mitigated_at)
POST/api/v1/incidents/{id}/resolveSessionincidents:commandMark resolved (sets resolved_at/sla_resolved_at, cascades to linked alerts)
POST/api/v1/incidents/{id}/closeSessionincidents:commandMark closed (sets closed_at)
POST/api/v1/incidents/{id}/reopenSessionincidents:commandReopen a resolved/mitigated/closed incident
POST/api/v1/incidents/{id}/cancelSessionincidents:commandCancel (terminal, false alarm)
POST/api/v1/incidents/{id}/escalateSessionincidents:commandManual escalation trigger

Triage

MethodPathAuthPermissionDescription
POST/api/v1/incidents/{id}/begin-triageSessionincidents:commandBegin triage (detectedtriaging)
POST/api/v1/incidents/{id}/promoteSessionincidents:commandPromote to active (triagingactive)

Timeline

MethodPathAuthPermissionDescription
GET/api/v1/incidents/{id}/timelineSessionincidents:readGet structured timeline
POST/api/v1/incidents/{id}/timelineSessionincidents:writeAdd manual timeline entry

Timeline entries carry event_type, actor_id, actor_type (system/user/agent), message, metadata, and an optional ics_event_type.

Linked Alerts

MethodPathAuthPermissionDescription
GET/api/v1/incidents/{id}/alertsSessionincidents:readList linked alerts
POST/api/v1/incidents/{id}/alertsSessionincidents:writeLink alert
DELETE/api/v1/incidents/{id}/alerts/{alert_number}Sessionincidents:writeUnlink alert

Incident Investigations

MethodPathAuthPermissionDescription
GET/api/v1/incidents/{id}/investigationsSessionincidents:readList investigations under incident
POST/api/v1/incidents/{id}/investigationsSessionincidents:writeCreate investigation under incident
PATCH/api/v1/incident-investigations/{id}/assignSessionincidents:writeAssign an incident investigation

Incident investigations follow pending → assigned → investigating → complete/cancelled/paused/coordinating. Only one active investigation per incident is enforced, and parent/child investigations are supported.

Coordination

MethodPathAuthPermissionDescription
GET/api/v1/incidents/{id}/coordination/messagesSessionincidents:readList coordination messages
POST/api/v1/incidents/{id}/coordination/messagesSessionincidents:writeAdd coordination message
GET/api/v1/incidents/{id}/coordination/tasksSessionincidents:readList coordination tasks
POST/api/v1/incidents/{id}/coordination/tasksSessionincidents:writeCreate coordination task

Status Updates

MethodPathAuthPermissionDescription
GET/api/v1/incidents/{id}/status-updatesSessionincidents:readList status updates
POST/api/v1/incidents/{id}/status-updatesSessionincidents:commandCreate status update

Incident Document (ICS)

MethodPathAuthPermissionDescription
GET/api/v1/incidents/{id}/ics/documentSessionincidents:readGet all document sections
PUT/api/v1/incidents/{id}/ics/document/{section}Sessionincidents:writeUpdate a single section (version-checked)

ICS Roles

MethodPathAuthPermissionDescription
GET/api/v1/incidents/{id}/ics/rolesSessionincidents:readList ICS role assignments
POST/api/v1/incidents/{id}/ics/rolesSessionincidents:commandAssign ICS role
PATCH/api/v1/incidents/{id}/ics/roles/{roleId}Sessionincidents:commandUpdate ICS role assignment
DELETE/api/v1/incidents/{id}/ics/roles/{roleId}Sessionincidents:commandEnd ICS role assignment

Slack Incident Channels

MethodPathAuthPermissionDescription
POST/api/v1/incidents/{id}/slack-channelSessionincidents:commandCreate dedicated Slack channel
DELETE/api/v1/incidents/{id}/slack-channelSessionincidents:commandDelete/unlink Slack channel

Google Meet

MethodPathAuthPermissionDescription
POST/api/v1/incidents/{id}/google-meetSessionincidents:commandCreate Google Meet space
DELETE/api/v1/incidents/{id}/google-meetSessionincidents:commandUnlink Google Meet space

Metrics

MethodPathAuthPermissionDescription
GET/api/v1/incidents/metricsSessionincidents:readAggregate metrics (MTTA, MTTR, MTTM, SLA compliance)

SLA Tracking

Alga computes SLA deadlines at creation and a background SLA worker sweeps for breaches — see SLA Tracking for configuration and breach detection.

Agent API Endpoints

MethodPathAuthDescription
GET/api/v1/agent/incidents/{id}BearerGet incident context
GET/api/v1/agent/incidents/{id}/timelineBearerGet incident timeline
POST/api/v1/agent/incidents/{id}/timelineBearerAdd timeline entry
GET/api/v1/agent/incidents/{id}/tasksBearerList coordination tasks for the agent
PATCH/api/v1/agent/incidents/{id}BearerUpdate incident (requires investigate capability)

See Also

Released under the MIT License.