Resources / AlertRule
AlertRule
A real-time threshold or anomaly alert evaluated over a TelemetryStream (spec 0042).
Overview
| API | monitoring.etorm.com/v1alpha1 |
| Resource | alertrules (cluster-scoped inside its cluster) |
| Short names | alertrule |
| Available in | project clusters only |
| Status | written by a controller through /status |
Minimal example
apiVersion: monitoring.etorm.com/v1alpha1
kind: AlertRule
metadata:
name: example
spec:
workspaceRef:
name: "<name>"
streamRef:
name: "<name>"
query: "<query>"
Spec
| Field | Type | Required | Default | Allowed | Description |
workspaceRef | reference to MonitoringWorkspace | yes | | | Target MonitoringWorkspace. |
streamRef | reference to TelemetryStream | yes | | | TelemetryStream to evaluate. |
query | string | yes | | length 1 to 1024 | Aggregate query expression (e.g. p99(duration_ms) > 500). |
windowSeconds | integer | | 60 | 10 to 86400 | Lookback window in seconds. |
evalIntervalSeconds | integer | | 30 | 10 to 3600 | Evaluation cadence in seconds. |
forSeconds | integer | | 0 | 0 to 86400 | Hysteresis duration in seconds the threshold must stay breached before Firing. |
webhookUrl | string | | | up to 512 characters | Optional webhook URL notified on Firing/Resolved transitions. |
severity | string (one of) | | "warning" | info, warning, critical | Alert severity. |
paused | boolean | | false | | Pause alert evaluation. |
Status
| Field | Type | Required | Default | Allowed | Description |
phase | string | | | | Pending, Normal, Firing, or Paused. |
firingSince | string | | | | RFC 3339 timestamp when the alert condition first breached. |
lastEvaluatedAt | string | | | | RFC 3339 timestamp of last evaluation. |
lastValue | number | | | | Most recent evaluated aggregate value. |
conditions | list of object | | | | Status conditions. |
conditions[].type | string | | | | Condition type. |
conditions[].status | string | | | | True or False. |
conditions[].reason | string | | | | Machine-readable reason. |
conditions[].message | string | | | | Human-readable detail. |
Columns in listings
| Column | From |
|---|
| Stream | .spec.streamRef.name |
| Severity | .spec.severity |
| Phase | .status.phase |
All resources