Alerting
Observability workspaces include a Prometheus-compatible ruler (alert and recording rules) and Alertmanager for routing notifications. Manage configuration from the console, with mimirtool, or via compatible APIs against the workspace gateway.
Overview
| Component | Role |
|---|---|
| Alert rules | PromQL conditions that fire alerts |
| Recording rules | Pre-computed PromQL results for faster queries |
| Alertmanager | Groups, silences, and routes alerts to receivers |
Metrics alerting runs in the workspace metrics backend. Log-based alerting is not covered on this page.
Create alert rules
groups:
- name: infrastructure
interval: 30s
rules:
- alert: HighCPUUsage
expr: 100 - (avg(rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 80
for: 5m
labels:
severity: warning
team: platform
annotations:
summary: "High CPU usage detected"
description: "CPU usage is {{ $value }}% on {{ $labels.instance }}"| Field | Meaning |
|---|---|
expr | PromQL that must be true for the alert to fire |
for | Duration the condition must hold before firing |
labels | Attached to the alert for routing |
annotations | Human-readable summary and description |
Recording rules
groups:
- name: recording_rules
interval: 30s
rules:
- record: instance:node_cpu:rate5m
expr: rate(node_cpu_seconds_total[5m])
- record: instance:node_memory:usage_percent
expr: (1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100Console
- Open the workspace.
- Use Rules to create or edit rule groups.
- Use Alerts to review firing/pending alerts and manage Alertmanager configuration and silences.
The principal needs ruler and Alertmanager data-plane permissions on the workspace.
Managing rules with mimirtool
Point mimirtool at the workspace metrics gateway and use the workspace ID as the tenant ID.
Authenticate with a Thalassa Cloud bearer token — for example a personal access token or an access token from a service account. For CI pipelines that use workload identity, exchange an ID token with tcloud oidc token-exchange (see OIDC).
export MIMIR_ADDRESS=https://prometheus.<region>.thalassa.cloud/workspace/obsw-<id>
export MIMIR_TENANT_ID=obsw-<id>
export THALASSA_BEARER_TOKEN="<your-access-token>"
mimirtool rules load rules.yaml \
--address "$MIMIR_ADDRESS" \
--id "$MIMIR_TENANT_ID" \
--token "$THALASSA_BEARER_TOKEN"
mimirtool rules list \
--address "$MIMIR_ADDRESS" \
--id "$MIMIR_TENANT_ID" \
--token "$THALASSA_BEARER_TOKEN"
mimirtool alertmanager load alertmanager.yaml \
--address "$MIMIR_ADDRESS" \
--id "$MIMIR_TENANT_ID" \
--token "$THALASSA_BEARER_TOKEN"Install mimirtool from the Grafana Mimir releases. Flag names can vary by mimirtool version (--tenant-id vs --id); use the flags for your installed version.
Gateway APIs
Ruler and Alertmanager HTTP APIs are available under the workspace metrics base URL (same host/path prefix as remote write). Authenticate with Authorization: Bearer <token>.
Examples (adjust paths to match the workspace alerting URLs shown in the console):
# List rule groups
curl -H "Authorization: Bearer $TOKEN" \
"https://prometheus.<region>.thalassa.cloud/workspace/obsw-<id>/api/v1/rules"
# Alertmanager status / alerts
curl -H "Authorization: Bearer $TOKEN" \
"https://prometheus.<region>.thalassa.cloud/workspace/obsw-<id>/alertmanager/api/v2/alerts"Prefer the URLs from the workspace overview (alertingUrl and related paths) when integrating automation.
Alert routing
route:
group_by: ["alertname", "cluster"]
group_wait: 10s
group_interval: 10s
repeat_interval: 12h
receiver: "default"
routes:
- matchers:
- severity="critical"
receiver: "pager"
- matchers:
- severity="warning"
receiver: "slack-alerts"Configure receivers for SMTP, webhooks, Slack, Microsoft Teams, or other Alertmanager-supported integrations.