Recipes / Notice when coverage stops
Notice when coverage stops
/stories in hybrid mode. The parameters matter less
than the reasoning behind them, so that is most of what is below.
The request
GET /stories
?q=<subject>
&mode=hybrid
&from=<now - 24h>
# alert when the count drops below the trailing baseline Why these parameters
Most monitoring alerts on the appearance of coverage. The inverse is often more informative: a subject that was being covered daily and suddenly is not usually means something changed, and nothing will ever trigger a presence-based alert.
What comes back
A count you compare against a trailing baseline rather than a result set you read. Store the daily count and alert on a sustained drop rather than a single quiet day.
How this goes wrong
Alerting on a one-day gap. Weekends, holidays and publication rhythms produce constant single-day quiet periods; only a multi-day deviation from the baseline for that day-of-week means anything.