# raise a warning alarm if an anomaly probability is consistently above 50%

template: anomaly_probabilities
      on: anomalies.probability
  lookup: average -2m foreach *
   every: 1m
    warn: $this > 50
    info: average anomaly probability > 50% for last 2 minutes

# raise a warning alarm if an anomaly flag is consistently firing

template: anomaly_flags
      on: anomalies.anomaly
  lookup: sum -2m foreach *
   every: 1m
    warn: $this > 10
    info: count of anomalies > 10 for last 2 minutes
