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_matchersStored metadata only — reserved for future auto-matching; NOT evaluated during alert ingestion today
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. Each dependent recomputes its status from its own linked incidents only and the walk continues transitively

No inherited impact today: a downstream service's status only changes if an incident is linked to that service (via its service_id). The cascade re-evaluates dependents but does not roll upstream impact into their scores — an incident on C does not degrade B or A merely because B depends on C. Link incidents to each affected service explicitly to reflect impact there.

Alert→service linkage is manual: attach service_id to an incident (at creation or afterward). Service label_matchers are stored metadata and are not evaluated during alert ingestion or correlation.

Each status change publishes a service_status_changed SSE event so the UI updates live.

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}/incidentsSessionincidents:readList incidents affecting this service

Agent API

MethodPathAuthDescription
GET/api/v1/agent/servicesBearerList services

Released under the MIT License.