Skip to main content

How Monitors Work

This page explains how observability monitors work: the query, the expectation, statuses, and anomaly detection options.

Query and Expectation

Each monitor runs a query (either generated by Matia for standard types or your Custom SQL). The query runs on a schedule (manual, interval, or cron). Matia stores the result (e.g. row count, single numeric value) and compares it to an expectation:

  • Within expectationHealthy (green).
  • Outside expectationAlerting (red); an issue is created and notifications are sent according to recipient channels and notification behavior.
  • Training → For monitors using automatic anomaly detection, the first 7 days after creation are training. The result is shown (e.g. blue line) but no alert is fired; Matia learns the normal range.
  • Error → The query failed (e.g. warehouse error). Hover on the error label to see the message. No expectation is evaluated.

Anomaly Detection Approach

  • Automatic: Matia trains on historical results and builds an expected range. Choose sensitivityLow, Medium, or High. Higher sensitivity means smaller deviations trigger alerts. Training lasts 7 days from creation.
  • Manual (business rule): Define the expectation explicitly:
    • Single value: Alert when result is equal to or not equal to a number.
    • Range: Set min and/or max (e.g. at or above X, below Y). The monitor alerts when the result falls outside this range.

Run Frequency and Time Window

  • Run frequency: Manual (run on demand), Interval (e.g. every hour), or Cron (cron expression).
  • Time window (optional): For expensive queries, restrict the query to a rolling time range (e.g. last 3 days) by selecting a timestamp/date column and an integer + unit. The monitor then runs only on rows in that window to reduce cost.

Notification Behavior

Workspace default: notify once when an issue is created and once when it resolves. Per-monitor overrides allow sending a notification on every monitor run that is anomalous. See Configure alert routing and Account settings – Observability.

For types of monitors, see Monitor types. For status and lifecycle, see Monitor status and lifecycle.