1. SLOs #
Objective, error budget and burn rate.
The concepts #
| Indicator | Definition |
|---|---|
| SLI | good requests / total requests over the period |
| Error budget | 100% − objective; 99.9% over 28 days = 40.3 minutes |
| Remaining budget | 1 − (error rate over the period / budget) |
| Burn rate | error rate over a window / budget; 1 = budget used up exactly at period end |
Creating an SLO #
Alerting & IRM → SLO screen: two PromQL queries containing $window (replaced by 5m, 1h, 28d…), an objective (e.g. 99.9), a rolling period (7, 14, 28, 30 or 90 days) and a service, added as the service_name label. Templates exist for HTTP availability, HTTP latency and blackbox probes.
# Good requests
sum(rate(http_server_request_duration_seconds_count{service_name="checkout", http_response_status_code!~"5.."}[$window]))
# Total requests
sum(rate(http_server_request_duration_seconds_count{service_name="checkout"}[$window]))States shown: Compliant, Low budget (under 25% left), Fast burn (1 h burn rate ≥ 6), Objective missed (budget exhausted).
Burn-rate alerts #
| Windows | Burn rate | Severity | Meaning |
|---|---|---|---|
| 1 h and 5 min | 14.4 | critical | 2% of the budget in 1 h |
| 6 h and 30 min | 6 | critical | 5% of the budget in 6 h |
| 1 d and 2 h | 3 | warning | 10% of the budget in 1 day |
| 3 d and 6 h | 1 | warning | 10% of the budget in 3 days |
Observa generates these four rules (the multiwindow, multi-burn-rate method from the Google SRE Workbook) in the slo folder, with the slo, slo_uid, burn_window and source="observa-slo" labels. They are regenerated whenever the SLO changes.
Best practice : The double window (long and short) avoids two traps: alerting on a brief spike that is already over, and keeping on alerting long after things are back to normal.
2. On-call and incidents #
Schedules, escalations, acknowledgement, incidents.
Escalation #
Alerting & IRM → On-call & incidents screen. A schedule combines rotations (participants, start date, 8 h, 12 h, daily, weekly or two-week handover) and one-off overrides, which take priority. Handovers for the next 14 days are shown.
| Chain step | Effect |
|---|---|
| Notify on-call | e-mail to the on-call person of the schedule |
| Notify users | e-mail to the listed users |
| Notify a contact point | Teams, Slack, PagerDuty, ServiceNow… |
| Wait | N-minute pause |
The chain repeats up to 10 times. To use it: create a contact point of type Escalation chain (on-call), then route it in Alerting → Policies (for example severity="critical"). The Acknowledge button (Editor role) stops the escalation.
Incidents #
- Declare an incident (Editor): title, severity (critical, major, minor), summary, linked alerts.
- Status: ongoing, mitigated, resolved (duration computed).
- Roles: incident lead, communication, investigation.
- Timeline fed automatically and by notes.
- Post-mortem: impact, root cause, corrective actions.
Good to know : The AI assistant and MCP agents can declare an incident, add a note or ask who is on call (who_is_on_call).3. SLA commitments #
Contractual objectives measured per calendar period.
SLA or SLO? #
An SLA commitment is a contractual objective (for example 99.9% availability per month) on a target: a URL watched by probes, a synthetic test scenario, an application instrumented with OpenTelemetry or a custom query. Alerting & IRM → SLA & built-in alerts screen, SLA commitments tab (read: Viewer; enable and edit: Editor).
| SLO | SLA commitment | |
|---|---|---|
| Nature | internal objective | contractual objective |
| Period | rolling (28 days for example) | calendar: week, month, quarter or year |
| Tracking | error budget and burn rate | report of the last 12 periods, remaining budget |
| Use | drive reliability day to day | report to a customer or management |
Good to know : Both can coexist on the same target: a stricter internal SLO (99.95%) protects a contractual commitment (99.9%).
Enabling SLAs #
Targets are discovered automatically over the last 24 h, within your multi-tenant scope. Possible measures are availability, performance (with a threshold) and success rate. The objective is typed in, or derived from a service level (bronze, silver, gold, platinum).
| Type | Source | Availability | Performance |
|---|---|---|---|
| URL | Blackbox exporter, Grafana Synthetic Monitoring | probe_success | probe_duration_seconds ≤ threshold (s) |
| URL | Uptime Kuma (/metrics) | monitor_status = 1, maintenance excluded | monitor_response_time ≤ threshold (ms) |
| URL | UptimeRobot (through an exporter) | uptimerobot_monitor_up | uptimerobot_monitor_response_time |
| Scenario | k6 (experimental-prometheus-rw output) | k6_checks_rate | k6_http_req_duration_p95 ≤ threshold |
| Scenario | Dynatrace Synthetic | builtin:synthetic.*.availability | browser / HTTP duration ≤ threshold |
| Application | OpenTelemetry services | requests without server error | requests under the threshold (histogram bucket) |
| Custom | any source | PromQL good / total with $window | series: share of points ≤ threshold |
Best practice : The Blackbox Exporter seen in the Prometheus course becomes contractual evidence here: each probed URL can carry an availability and response-time commitment, with a monthly report ready to send.
Tracking and alerting #
| State | Meaning |
|---|---|
| Met | SLI ≥ objective, and at least 25% of the budget left |
| At risk | objective met but budget nearly used up, or current period still recoverable |
| Missed | SLI < objective over a finished period (or budget exhausted) |
The summary counts commitments that are met, at risk, missed and without data; the report shows the SLI of the last 12 periods against the objective. For PromQL measures, Observa generates multi-window burn-rate alerts (1 h, 6 h, 1 d, 3 d), as for SLOs, with the sla, sla_kind, sla_target_type, sla_tier and source="observa-sla" labels: route them to the on-call matching the service level. Series-mode measures (Dynatrace for example) are tracked without alerts.
OBS=https://observa.example.com; TOKEN=obs_xxxxxxxx
# List with the current period state
curl -s -H "Authorization: Bearer $TOKEN" "$OBS/api/alerting/slas?status=true" | jq
# Compliance over the last 12 calendar periods
curl -s -H "Authorization: Bearer $TOKEN" "$OBS/api/alerting/slas/<uid>/report?periods=12" | jqMulti-tenancy : A user restricted to a tenant only sees their commitments; their PromQL queries are confined to their scope and series mode is denied to them, since it cannot be confined.
4. Automating with workflows #
What you do by hand when an alert fires, automated.
The idea #
Workflows automate what you usually do by hand when an alert fires or at regular intervals: enrich context, notify the right team, set a silence, declare an incident, call an external tool, produce a report. They follow the principles of Grafana Workflows and Dynatrace Workflows. Alerting & IRM → Workflows menu (read: Viewer; create and run: Editor).
A workflow is a trigger, a directed acyclic graph of tasks (each task runs an action and may depend on others), default inputs (input('key')) that can be overridden at launch and an optional result. Each trigger creates an execution that freezes the definition and logs, for each task, the state, attempts, duration, result and errors.
Triggers and actions #
| Trigger | How it works |
|---|---|
| On demand | ▶ button or API, with JSON inputs |
| Scheduled | 5-field cron (0 8 * * 1-5) in a time zone; a single trigger per minute, even with several replicas |
| Alert | firing and/or resolution of an Observa rule; Alertmanager matchers (severity="critical"); deduplication for N minutes |
| Webhook | POST /api/public/workflows/hooks/<token> without authentication: the secret token acts as the key; JSON body of 256 KiB at most |
curl -X POST https://observa.example.com/api/public/workflows/hooks/<token> \
-H 'Content-Type: application/json' \
-d '{"title": "Deployment 1.4.2", "input": {"env": "prod"}}'| Action | Role |
|---|---|
| Data source query | PromQL, LogQL…; returns series, count, rows or logs |
| Notify a contact point | Slack, Teams, e-mail, PagerDuty, webhook… |
| Declare an incident · Create a silence | in On-call & incidents; silence by matchers for a duration |
| Compute a value · Wait | filter, aggregate, format a Markdown table; pause (1 h at most) |
| Request approval | holds the execution until an Editor or a named approver agrees |
| Run a workflow | sub-workflow, 3 levels at most |
| HTTP request | calls any API (ticketing, ChatOps, runbook); administrators only |
Conditions, loops and expressions #
- State conditions: a task starts when its predecessors succeeded or were skipped (default), succeeded, failed, failed or were cancelled, or always. Error branches are used to notify or open a ticket.
- Custom condition, for example
result('query').count > 0: when false, it skips the task or stops the workflow. - Loop over a list (
{{ result('query').series }}), concurrency from 1 to 10, 500 items at most; retries with delay, maximum duration per task.
Every field accepts Jinja expressions evaluated in a sandbox: event(), input(), result(), task(), execution(), now('Europe/Paris'), and the to_json, regex_search, md_table… filters.
{{ event().alertname }} on {{ event().labels.instance }}
{{ result('query').series | selectattr('value', 'gt', 0.05) | list }}
{% for s in result('errors').series%}- {{ s.labels.service_name }}: {{ (s.value * 100) | round(2) }}%
{% endfor%}The Templates tab offers ready-to-adapt workflows: critical alert enriched with the service error rate, incident after approval, maintenance window (silence and announcement), daily report of services above 1% errors, webhook to a ticket, traffic check over a list of services. The editor offers a visual view (graph), a JSON view to version and a Validate button that detects cycles, unknown dependencies and expression errors.
Security and limits #
- Workflow pages and API are denied to users restricted to a multi-tenant scope, because a workflow acts on all data.
- HTTP requests are reserved for administrators (risk of SSRF towards the internal network).
- Executions run in the
alertingservice: a restart fails the running executions of that instance, pending approvals are kept. - Limits: 50 tasks per graph, task result truncated beyond 256 KiB.
Best practice : Start with a read-only template (daily report), then add an approval step before any action that changes state (silence, incident): automation earns the on-call team's trust step by step.
