We often think we know what we're measuring, but reality can be different. For example, some might think that counting file processing messages gives a good signal for system efficiency. But what if each message carries a batch of up to ten URLs, and what we *really* care about is the number of PDF downloads? Here, measuring messages becomes a major mistake because one message isn't equal to one unit of work. This error isn't deliberate; it's simply a lack of detailed knowledge about how the system truly operates. This leads to incorrect metrics, flawed expectations, and undermines everything that relies on these measurements. Alerts based on such errors will wake you up to numbers that seem 'normal' but are actually meaningless.
Another challenge we face comes from alerts that rely on a 'floor' of work. For instance, an alert saying: «If there are fewer than N items in M minutes, page.» In systems that process nightly batches, this alert will fire every single night simply because there's no work at that time. This makes you think there's a problem when there isn't. This type of alert can't tell the difference between a 'stuck system' and an 'idle system with genuinely no work'.
A better solution is to focus on indicators like the 'age of the oldest queued message'. This alert is excellent because if nothing is queued, there's nothing to be old, so it stays silent during normal idle periods. But if work is queued and not moving, the message's age climbs, instantly signaling an issue, whether the processor crashed or is simply not consuming work. This is far better than trying to define a 'normal' number of messages per minute. When you ask: «Has anything been sitting here for six hours?» your question is based on reality, not an assumed model of your system's operation. Understanding these nuances will significantly improve the accuracy of your alerts.