AI News

Cloud Monitoring Drops Static Thresholds for Dynamic Alerts

Quick answer

Cloud Monitoring now supports two-year lookback PromQL alerts for dynamic thresholds. Say goodbye to static thresholds and hello to anomaly detection that adapts to your data.

Choosing the right threshold for alert policies has always been a headache. Static thresholds break as workloads grow, and seasonal metrics laugh in the face of a single number. But now, Cloud Monitoring alerts are getting a serious upgrade: long-lookback alert policies for PromQL (currently in preview) that let you query up to two years of metric data. That means dynamic thresholds that adapt to your data’s natural rhythms.

What’s New?

You can now write PromQL alert policies that compare recent behavior to historical baselines—like a week, month, or even year-over-year. Instead of guessing a static number, you define how anomalous things need to get before you’re paged. This is perfect for catching dips or spikes that would otherwise hide within normal daily variation.

Dynamic Threshold Algorithms

Pick the right algorithm for your data shape:

Moving Averages

Compare the last 5 minutes to a one-week average. Alert if it’s 30% higher or lower. Great for stable metrics.

sum(rate(http_requests_total[5m])) / sum(rate(http_requests_total[1w])) > 1.3 OR < 0.7

Z-Score (Standard Deviation)

Uses average and standard deviation to detect outliers. A z-score above 3 or below -3 is considered anomalous. Works well for data with stable averages and decent volatility.

abs(sum(rate(http_requests_total[5m])) - sum(rate(http_requests_total[1w]))) / stddev_over_time(sum(rate(http_requests_total[5m]))[1w:5m]) > 3

Seasonal Decomposition (Time Offset)

Compare the current period to the same period yesterday or last week. Ideal for metrics with daily or weekly patterns, like website traffic.

sum(rate(http_requests_total[5m])) / sum(rate(http_requests_total[5m] offset 1d)) < 0.5

To avoid false alerts from holidays, average multiple historical periods (e.g., one and seven days ago).

Control Runaway Costs

Dynamic thresholds can also prevent overspend. For example, alert if AI token usage spikes 25x above the weekly average, then trigger a Cloud Run function to lower your quota to zero. Stop the bleeding fast.

Get Involved

Google is working on productizing anomaly detection and even AI-powered models. Sign up as a design partner to shape the future.

For more on cloud monitoring tools, check out our Google Cloud review and Cloudflare Workers review.

Original announcement published on Google Cloud.