Resources / AlertRule

AlertRule

A real-time threshold or anomaly alert evaluated over a TelemetryStream (spec 0042).

Overview

APImonitoring.etorm.com/v1alpha1
Resourcealertrules (cluster-scoped inside its cluster)
Short namesalertrule
Available inproject clusters only
Statuswritten 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

FieldTypeRequiredDefaultAllowedDescription
workspaceRefreference to MonitoringWorkspaceyesTarget MonitoringWorkspace.
streamRefreference to TelemetryStreamyesTelemetryStream to evaluate.
querystringyeslength 1 to 1024Aggregate query expression (e.g. p99(duration_ms) > 500).
windowSecondsinteger6010 to 86400Lookback window in seconds.
evalIntervalSecondsinteger3010 to 3600Evaluation cadence in seconds.
forSecondsinteger00 to 86400Hysteresis duration in seconds the threshold must stay breached before Firing.
webhookUrlstringup to 512 charactersOptional webhook URL notified on Firing/Resolved transitions.
severitystring (one of)"warning"info, warning, criticalAlert severity.
pausedbooleanfalsePause alert evaluation.

Status

FieldTypeRequiredDefaultAllowedDescription
phasestringPending, Normal, Firing, or Paused.
firingSincestringRFC 3339 timestamp when the alert condition first breached.
lastEvaluatedAtstringRFC 3339 timestamp of last evaluation.
lastValuenumberMost recent evaluated aggregate value.
conditionslist of objectStatus conditions.
conditions[].typestringCondition type.
conditions[].statusstringTrue or False.
conditions[].reasonstringMachine-readable reason.
conditions[].messagestringHuman-readable detail.

Columns in listings

ColumnFrom
Stream.spec.streamRef.name
Severity.spec.severity
Phase.status.phase

All resources