Skip to content

Services

Alga includes a service catalog that tracks service status, dependencies, and incident impact.

Service Status

Service status is computed using a weighted priority-based scoring system. Active incidents linked to the service are weighted by severity priority:

PriorityWeight
P15
P24
P33
P42
P51

The total score determines the service status:

ScoreStatusDescription
0operationalFully operational, no active incidents
1–4degradedPartial degradation, some features impacted
5–9partial_outageSignificant partial outage
10+major_outageComplete service outage

For example, a single P1 incident (score 5) results in partial_outage, while two P1 incidents (score 10) trigger major_outage.

Status is recalculated automatically as incidents are created, mitigated, or resolved. When all incidents are resolved, the service returns to operational.

Service Fields

FieldDescription
nameService name (unique)
display_nameHuman-friendly display name
descriptionService description
owner_team_idTeam responsible for the service
escalation_policy_idEscalation policy for incidents on this service
label_matchersJSON array of label conditions for matching alerts to this service
sla_response_minutesCustom SLA response target in minutes
sla_resolve_minutesCustom SLA resolution target in minutes
statusCurrent computed status (operational, degraded, partial_outage, major_outage)

Dependencies

Services can declare dependencies on other services. A dependency is stored as service_iddependent_on_service_id with a dependency_type (default depends_on), forming a directed dependency graph.

Dependency Cascade

When an incident transitions state, the affected service's status is recomputed and the change cascades through the graph using BFS (breadth-first search):

  1. PropagateAndCascade() starts at the affected service
  2. It recomputes the weighted status for the current service and persists any change
  3. It then enqueues every service that depends on the current service (GetDependents)
  4. The cascade continues transitively — if A depends on B and B depends on C, a C incident recomputes status for both B and A

Each status change publishes a service_status_changed SSE event so the UI updates live. This ensures teams responsible for downstream services see upstream degradation reflected in their own service status without manual notification.

API Endpoints

Service Management

MethodPathAuthPermissionDescription
GET/api/v1/servicesSessionservices:readList services
POST/api/v1/servicesSessionservices:writeCreate service
GET/api/v1/services/{id}Sessionservices:readGet service (includes status, dependencies)
PATCH/api/v1/services/{id}Sessionservices:writeUpdate service
DELETE/api/v1/services/{id}Sessionservices:writeDelete service

Dependencies

MethodPathAuthPermissionDescription
GET/api/v1/services/{id}/dependenciesSessionservices:readGet dependency graph
POST/api/v1/services/{id}/dependenciesSessionservices:writeAdd dependency
DELETE/api/v1/services/{id}/dependencies/{targetId}Sessionservices:writeRemove dependency
GET/api/v1/services/{id}/dependentsSessionservices:readList services that depend on this service

Incidents

MethodPathAuthPermissionDescription
GET/api/v1/services/{id}/incidentsSessionservices:readList incidents affecting this service

Agent API

MethodPathAuthDescription
GET/api/v1/agent/servicesBearerList services

Released under the MIT License.