Usage alerts (the Watchdog)
The Watchdog checks every SIM's and pool's usage against alert rules you set. When a rule fires it emails your alert contacts, sends a webhook, logs it, and (if the rule says so) suspends the SIM, or every SIM in the pool.
Two kinds of rule
type | Fires when | action |
|---|---|---|
threshold | Usage passes a percentage of the allowance (thresholdPercent, 1 to 100) | warn or suspend |
burn_rate | At the current rate, the whole allowance will be used before the month ends (checked once the month, or the SIM's first month, is 5 days in) | warn only |
Each rule fires at most once a day for the same SIM or pool, so you won't be flooded.
Where rules apply
| Scope | How to make it | Applies to |
|---|---|---|
sim | simId set | That SIM |
pool | poolId set | That pool as a whole |
account | neither set | The default for every pool, and every SIM not in a pool, that has no rules of its own |
If a SIM (or pool) has any rules of its own, the account defaults don't apply to it. A SIM in a pool is covered by its
pool's rules (the pool shares one allowance), unless you give that SIM rules of its own. Those are measured against the
SIM's share of the pool (poolShareBytes), and the pool's rules still cover the pool as a whole.
You can have several threshold rules in one place (say, warn at 80% and suspend at 100%), but only one auto-suspend rule and one burn-rate rule per SIM, pool or account.
Set up a sensible default
A warning at 80% and a burn-rate warning for everything, as the account default:
- cURL
- Node.js
- Python
for body in \
'{ "type": "threshold", "action": "warn", "thresholdPercent": 80 }' \
'{ "type": "burn_rate", "action": "warn" }'
do
curl -X POST https://app.zentarinetworks.com/api/v1/watchdog/alerts \
-H "Authorization: Bearer $AXIS_API_KEY" \
-H "Content-Type: application/json" \
-d "$body"
done
const rules = [
{ type: 'threshold', action: 'warn', thresholdPercent: 80 },
{ type: 'burn_rate', action: 'warn' },
];
for (const rule of rules) {
await fetch('https://app.zentarinetworks.com/api/v1/watchdog/alerts', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.AXIS_API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify(rule),
});
}
for rule in [
{"type": "threshold", "action": "warn", "thresholdPercent": 80},
{"type": "burn_rate", "action": "warn"},
]:
requests.post(
"https://app.zentarinetworks.com/api/v1/watchdog/alerts",
json=rule,
headers={"Authorization": f"Bearer {os.environ['AXIS_API_KEY']}"},
)
And a hard stop for one SIM that must never go over:
{ "simId": 4183, "type": "threshold", "action": "suspend", "thresholdPercent": 100 }
201 Created:
{
"id": 21,
"scope": "sim",
"poolId": null,
"simId": 4183,
"type": "threshold",
"action": "suspend",
"thresholdPercent": 100,
"isActive": true,
"lastTriggeredAt": null,
"createdAt": "2026-10-08T15:02:11Z",
"updatedAt": "2026-10-08T15:02:11Z"
}
Reacting to alerts
Each alert arrives as a webhook: watchdog.sim.threshold, watchdog.sim.burn_rate, watchdog.pool.threshold or
watchdog.pool.burn_rate. The payloads are on Webhooks. Typical responses:
- A warning: tell the customer or driver, or buy a top-up automatically.
- A suspension (
"action": "suspend"): the SIM is already being suspended. To bring it back, top up with"reactivate": true, or raise its allowance and reactivate it. Or leave it: if Switch suspended SIMs back on next month is ticked in the portal (Settings > Tenant), it comes back on by itself at the start of next month, when usage resets.
Managing rules
All rules, or one scope: ?scope=account, ?scope=pool&poolId=7, ?scope=sim&simId=4183 | |
Change type, action, thresholdPercent, or send "isActive": false to pause it (true turns it back on) | |
| Removes it | |
What the Watchdog noticed and did, newest first. Filter by simId, poolId, level (info, warning, suspend), date or search |
The Watchdog's actions and rule changes also appear in your event log with
"type": "watchdog".
Exempting a SIM or pool
Some SIMs must never be suspended, whatever they use (a payment terminal, an alarm). Exempt them and the Watchdog ignores them completely: no alerts, no auto-suspend.
{ "exempt": true }
Send { "exempt": false } to monitor it again. Each SIM and pool shows watchdogExempt.
What can go wrong
| Answer | Why |
|---|---|
400 | thresholdPercent missing or outside 1 to 100 on a threshold rule, or a burn-rate rule set to suspend |
404 | The SIM or pool isn't yours (or the pool isn't active) |
409 conflict | A second auto-suspend or burn-rate rule in the same place, or a threshold rule that duplicates one already there |