What is metric monitoring? Threshold vs baseline
Metric monitoring is watching a business number, such as daily revenue or signups, and alerting when it moves in a way that looks wrong. A threshold monitor fires when the value crosses a line you chose. A baseline monitor learns what is normal from the metric's recent history and fires when a new value is an outlier. Thresholds are simple and predictable. Baselines save you from picking numbers and adapt as the metric grows.
Two ways to say “that looks wrong”
Every metric alert answers one question: is today’s value acceptable? The two designs differ in who supplies the answer.
Threshold. You supply it. Alert when revenue < 800. It is easy to reason about, easy to explain in a postmortem, and wrong the day the business doubles and 800 is no longer a meaningful floor.
Baseline. The history supplies it. The monitor keeps recent observations and alerts when the new one is far from what they suggest. You do not pick a number, but you also cannot say in advance exactly where it will fire.
A threshold in SQL
SELECT revenue
FROM daily_revenue
WHERE day = current_date - 1
AND revenue < 800;
In arcodash, query revenue for yesterday, add a monitor with < and 800, and schedule the query. The alerts overview explains how the condition is evaluated and when it notifies.
A baseline in SQL
The usual robust approach compares the new value with the median of recent values, scaled by the median absolute deviation. Unlike a mean and standard deviation, one earlier outlier does not stretch the band.
WITH hist AS (
SELECT revenue FROM daily_revenue
WHERE day < current_date - 1
AND day >= current_date - 31
),
med AS (
SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY revenue) AS m FROM hist
),
mad AS (
SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY abs(revenue - m)) AS d
FROM hist, med
)
SELECT r.revenue, med.m AS median,
round((0.6745 * (r.revenue - med.m) / mad.d)::numeric, 1) AS robust_z
FROM daily_revenue r, med, mad
WHERE r.day = current_date - 1
AND abs(0.6745 * (r.revenue - med.m) / mad.d) > 3.5
AND abs(r.revenue - med.m) > 0.02 * med.m;
The 0.6745 factor is the common scaling for a modified z-score, and 3.5 is the conventional cutoff. The last condition ignores moves under 2 percent of the median, so a very stable metric does not alert on noise.
What arcodash does
arcodash ships baseline monitors, so you do not have to write the query above. Choose Baseline instead of Threshold when creating the monitor. Until it has 7 observations it only collects data, then it compares each new value with the median of the last 30 using a robust z-score. Changes under 2 percent of the median are never flagged, and sensitivity is low, medium or high (cutoffs of 5, 3.5 and 2.5). The evaluation is plain statistics with no AI call. It has no seasonality model, so strong weekly patterns can cause false positives. Details are in the baseline monitor docs. The SQL uses the same scaling and cutoff as the medium setting. arcodash also handles a perfectly flat history, where the deviation is zero and the SQL would divide by zero.
Choosing between them
Start with a threshold on any metric where you can name the unacceptable number. Add a baseline on metrics you check often but could not put a number on. When either fires, the next question is usually why, which is the subject of why did this metric drop.
For where this applies to business numbers, see signups and payments monitoring.
Questions
How is metric monitoring different from data observability?
Observability watches the data's health: late, missing or invalid. Metric monitoring watches what the data says. A metric can drop because the business changed even when every table is healthy, and the two kinds of alert answer different questions.
When should I use a threshold instead of a baseline?
Use a threshold when the right line is known and fixed, such as error rate above 2 percent, or when a drop below a contractual floor matters. Use a baseline when normal drifts or you would be guessing the number.
Why does a baseline monitor give false alarms on weekly patterns?
It compares a value with recent history, not with the same weekday. If weekends are always lower, a Saturday can look like an outlier. Monitor a weekday-adjusted metric, or use a threshold for those series.