Skip to content
  • There are no suggestions because the search field is empty.

Planning On-Call Setups with the AlertOps Semantic Layer

The AlertOps semantic layer turns on-call intent, such as a weekly after-hours rotation with a three-step escalation, into a complete, verified AlertOps configuration in one call.

Overview

Relevant for Developers and solution engineers turning on-call requirements into configuration

The semantic layer lets you describe on-call the way people talk about it — "three people, weekly after-hours rotation, Secondary after 15 minutes, Manager after 30" — and builds the matching AlertOps configuration for you. It is included in every AlertOps SDK and works in two steps:

  1. Plan. Planners turn your intent into exact AlertOps settings that follow AlertOps best practices. Planning runs locally, so you can review a design with a customer or a teammate before anything changes.
  2. Apply. The executor creates the group, members, shift, escalation and alert integration in the right order, reads each one back to confirm it, and gives you a report.

Key benefits:

  • Right by construction — shift times, start dates, Primary-first rotations and escalation timing follow AlertOps best practices automatically.
  • The best escalation design, chosen for you — the planner picks an escalation policy or a response play from the shape of your timeline.
  • Reviewable — validate_design lists anything worth a second look before you apply.
  • All or nothing — if a step fails, apply_blueprint removes what it created, and semantic.rollback undoes an apply on request.

Describe your coverage

Relevant for On-call designers choosing when a rotation applies

CoverageDays and window
24x7Every day, around the clock
business_hoursMonday to Friday, 08:00 to 16:59
after_hoursMonday to Friday, 17:00 to 07:59
weekendFriday 17:00 to Monday 07:59
customYour own days and times

Give times the way people say them: "5pm to 8am" is start 17:00 and end 08:00, and the planner converts the end to 07:59 so shifts never overlap.

Escalation is a list of steps, each with a delay in minutes and a role (primary, secondary or manager).

Plan and apply a complete on-call setup

Relevant for Developers rolling out on-call from code

This plans a weekly after-hours rotation for three people with a Primary at 0 and 5 minutes, Secondary at 15 and Manager at 30, then applies it as a group, shift, escalation policy and API integration in one call.

Python

from alertops.semantic import (Blueprint, Coverage, IntegrationSpec, Member, RotationSpec, Step,
plan_escalation, plan_rotation)

rotation = plan_rotation(RotationSpec("NOC", [Member(101, "Alice", "Ng"), Member(102, "Bob", "Ruiz"),
Member(103, "Carol", "Lee")], Coverage("after_hours")))
escalation = plan_escalation([Step(0), Step(5), Step(15, "secondary"), Step(30, "manager")])
report = ao.semantic.apply_blueprint(Blueprint(group_name="NOC", rotation=rotation, escalation=escalation,
integration=IntegrationSpec("noc-monitoring")))
print(report.summary())

TypeScript

import { blueprint, coverage, integrationSpec, member, planEscalation, planRotation, rotationSpec, step } from "@alertops/sdk";

const rotation = planRotation(rotationSpec("NOC",
[member(101, "Alice", "Ng"), member(102, "Bob", "Ruiz"), member(103, "Carol", "Lee")],
{ coverage: coverage("after_hours") }));
const escalation = planEscalation([step(0), step(5), step(15, "secondary"), step(30, "manager")]);
const report = await ao.semantic.applyBlueprint(blueprint("NOC", {
rotation, escalation, integration: integrationSpec("noc-monitoring"),
}));
console.log(report.summary());

Go

spec := alertops.NewRotationSpec("NOC", []alertops.Member{
{UserID: 101, FirstName: "Alice", LastName: "Ng"}, {UserID: 102, FirstName: "Bob", LastName: "Ruiz"},
{UserID: 103, FirstName: "Carol", LastName: "Lee"},
})
spec.Coverage = alertops.Coverage{Kind: alertops.CoverageAfterHours}
rotation, err := alertops.PlanRotation(spec, nil)
if err != nil {
return err
}
escalation, err := alertops.PlanEscalation([]alertops.Step{
alertops.NewStep(0, "primary", nil), alertops.NewStep(5, "primary", nil),
alertops.NewStep(15, "secondary", nil), alertops.NewStep(30, "manager", nil),
}, alertops.EscalationOptions{})
if err != nil {
return err
}
report, err := ao.Semantic.ApplyBlueprint(ctx, &alertops.Blueprint{
GroupName: "NOC", Rotation: &rotation, Escalation: &escalation, Priority: "Critical",
Integration: &alertops.IntegrationSpec{Name: "noc-monitoring"},
}, nil)
if err != nil {
return err
}
fmt.Println(report.Summary())

Java

import com.alertops.sdk.core.Json;
import com.alertops.sdk.semantic.Blueprint;
import com.alertops.sdk.semantic.Plan;
import com.alertops.sdk.semantic.Report;

Plan.RotationPlan rotation = Plan.planRotation(Plan.RotationSpec.of("NOC",
List.of(new Plan.Member(Json.toNode(101), "Alice", "Ng"), new Plan.Member(Json.toNode(102), "Bob", "Ruiz"),
new Plan.Member(Json.toNode(103), "Carol", "Lee")),
Plan.Coverage.of("after_hours")));
Plan.EscalationPlan escalation = Plan.planEscalation(List.of(
Plan.Step.of(0, "primary", null), Plan.Step.of(5, "primary", null),
Plan.Step.of(15, "secondary", null), Plan.Step.of(30, "manager", null)));
Report report = ao.semantic().applyBlueprint(
Blueprint.of("NOC", rotation, escalation, Blueprint.IntegrationSpec.of("noc-monitoring")));
System.out.println(report.summary());

.NET

using AlertOps.Semantic;

var rotation = Planner.PlanRotation(new RotationSpec("NOC",
new[] { new Member(101, "Alice", "Ng"), new Member(102, "Bob", "Ruiz"), new Member(103, "Carol", "Lee") })
{
Coverage = new Coverage("after_hours"),
});
var escalation = Planner.PlanEscalation(new[] { new Step(0), new Step(5), new Step(15, "secondary"), new Step(30, "manager") });
var report = await ao.Semantic.ApplyBlueprintAsync(new Blueprint("NOC")
{
Rotation = rotation, Escalation = escalation, Integration = new IntegrationSpec("noc-monitoring"),
});
Console.WriteLine(report.Summary());

The report lists the group, schedule, escalation policy and inbound integration it created. In week one Alice is on call, and Bob and Carol rotate in on the following weeks.

Rotation planned by the rotation planner

Figure 1. A rotation produced by the rotation planner, in the group's calendar: a continuous 24x7 shift with (P) Alice and (S) Bob on call in week one.

Escalation timeline from the escalation planner

Figure 2. An escalation policy applied from a Primary step at 0, a Secondary step at 2 and a Manager step at 4 minutes, in the timeline preview.

Apply one piece at a time

Relevant for Developers updating part of an existing setup

OperationWhat it does
semantic.apply_rotationEnsures the group and members, then creates the shift
semantic.apply_escalation_policyCreates an escalation policy with its roles and contact methods
semantic.apply_response_playCreates a response play with its steps and optional repeat
semantic.create_api_integrationCreates an API integration that notifies your policy or play
semantic.wire_integrationPoints an existing integration at a new policy and recipients
semantic.rollbackRemoves what an apply created, newest first

Best Practices

Relevant for Teams adopting on-call as code

  • Plan, review, then apply — share the plan and validate_design output before you write anything.
  • Keep members in week-one order — the first member is on call first.
  • Give each integration a unique source name so alerts are routed to the right team.

Related Articles

Need help?

Email support@alertops.com or contact your AlertOps representative.