← Back to Docs
Recipe

Time-series anomaly rule generator

Build detection rules that fire when a metric deviates from its rolling baseline.

Overview

This recipe ingests a time-series stream, computes a rolling mean and standard deviation over a configurable window, and emits an alert when the current value exceeds μ + kσ.

Parameters

NameTypeDefault
window_secondsint300
k_factorfloat3.0
min_samplesint10

Example rule

rule anomaly_latency {
  metric = "http_request_duration_ms"
  window = 300s
  threshold = 3.0 * stdev
  min_samples = 10
  action = alert
}

Next steps

Meridian © 2026 FoogleGiber LLC