The four alerts a messaging system actually needs
The failures that hurt in messaging are silent: a worker that stopped, a webhook that is no longer called, a session that ended. None of them produce errors, so error-rate alerting never fires. Alert on age, absence, mix and identity instead.
1. The age of the oldest unsent message
One number that catches a stopped worker, a lost lock, a crashed consumer, a full disk and a provider outage. If the oldest thing in the queue is older than a few minutes, something is wrong, and you do not need to know what to know that.
2. Absence of inbound traffic
An account that normally receives dozens of messages an hour and has received none for an hour is telling you something. Nothing else will: the webhook endpoint is not erroring, it is simply not being called.
Absence alerts need a floor, or they page you every Sunday morning. Compare against the same hour last week rather than against a fixed threshold, and only alert for accounts with enough traffic for absence to mean anything.
3. A change in the failure mix
A steady one percent failure rate that is all invalid numbers is healthy. The same one percent that has become all outside_service_window means your team stopped answering in time, and the same one percent that has become token errors means somebody lost access. Alert on the composition changing, not on the rate.
4. Per-identity health
| Signal | What it catches |
|---|---|
| Connection state per number | A session that ended |
| Time since last successful send, per number | One number down while others work |
| Quality rating, where the platform exposes it | A rating sliding before it costs you |
| Inbound-to-outbound ratio | Broadcast behaviour creeping in |
Aggregate metrics hide this completely. Four numbers where one is dead looks like a 25% dip, which looks like a quiet afternoon.
What to log on every message
The provider's error verbatim - code and subcode, not a paraphrase. Paraphrasing destroys the only thing that identifies the failure, and every diagnostic in the runbook starts from it.
Questions people actually ask
What should I alert on in a messaging system?
The age of the oldest unsent message, an absence of inbound traffic, a change in the mix of failure reasons, and per-number health. Error rate alone misses every silent failure.
Why alert on silence?
Because a broken webhook, a stopped worker and a dead session all produce no errors at all. The only symptom is that nothing is happening, and nothing does not trigger anything.
Njiwa
One inbox for WhatsApp, Facebook and Instagram, and an API that sends over either WhatsApp rail. 7 days free, no card.