Noise control
Maintenance windows, routing rules, grouping, flapping and snooze. Page less without losing anything.
Most alerts are not worth waking someone for. Surveys of on-call teams keep finding that more than half of alerts need no action, and that engineers who get too many learn to ignore them, including the one that matters. treason.app has the controls that fix this in the base product, and a report that tells you where to start.
One rule runs through all of it: an alert that is held back is still recorded. It is stored, de-duplicated, searchable and closable; it has a status (suppressed) and a reason (suppressedBy). When whatever held it ends, an alert that is still firing pages, so quiet never turns into lost. Held alerts are not billed and do not fire webhooks until they page.
#Maintenance windows
"I am deploying, do not page for the database." A window holds alerts that arrive while it is in effect.
# now, for two hours, only staging alerts
treason maintenance start "Deploy v42" --for 2h --tag env:staging
treason maintenance list --active
treason maintenance end <id> # done early: what it held pages now// one-off, starting now
const { window } = await treason.maintenance.start(120, { name: "Deploy v42", teamId });
// recurring: Tuesdays 14:00, one hour, New York time (daylight saving handled)
await treason.maintenance.create({
name: "Weekly deploy",
recurrence: { days: [2], time: "14:00", durationMinutes: 60, timezone: "America/New_York" },
conditions: [{ field: "tag", op: "is", value: "env:staging" }],
});
await treason.maintenance.delete(window.id); // ends it: what it held pagescurl -X POST "$TREASON_API_URL/v1/maintenance-windows" \
-H "Authorization: Bearer $TREASON_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"Deploy v42","startsAt":"2027-03-02T14:00:00Z","endsAt":"2027-03-02T16:00:00Z","teamId":"'$TEAM_ID'"}'A window covers everything unless you narrow it with teamId, integrationId, or conditions (all must match). What happens at the end is your choice: onEnd: "release" (the default) pages for alerts still open, onEnd: "discard" drops them. Deleting a window, or shortening it into the past, ends it at once.
#Routing rules
Rules run on every new alert, in order. Each rule whose conditions match applies its actions, and later rules see the effect of earlier ones, so one rule can add a tag that the next one matches. A rule with stop: true ends the run.
| Action | Does |
|---|---|
setPriority | P1–P5. P4 and P5 are push-only. |
routeToTeamId | Page that team's escalation policy instead of the source's team. |
suppress | Record the alert but never page for it. For things that are not incidents. |
addTags | Add tags, for later rules and for finding alerts. |
groupBy | Group related alerts into one page. See below. |
await treason.routing.create({
name: "Kubernetes goes to Platform",
conditions: [{ field: "tag", op: "is", value: "k8s" }],
actions: { routeToTeamId: platformTeamId },
});
await treason.routing.create({
name: "Nothing in staging is urgent",
conditions: [{ field: "tag", op: "is", value: "env:staging" }],
actions: { setPriority: "P5" },
});
await treason.routing.create({
name: "After hours, warnings are push-only",
conditions: [
{ field: "priority", op: "is", value: "P3" },
{ field: "time", timezone: "America/New_York", from: "22:00", to: "07:00" },
],
actions: { setPriority: "P4" },
});#Conditions
A condition looks at one field. Matching is case-insensitive.
| Field | Looks at |
|---|---|
message, description, alias, source, entity, priority | that text |
tag | the alert's tags (env:prod). Any tag matching counts. |
detail (with key) | one of the alert's details |
integration, team | an integration or team id |
time | a time range in a time zone, optionally on certain days. from later than to runs past midnight. |
| Operator | Meaning |
|---|---|
is, is_not, in | equals (any of, for in) |
contains, not_contains | substring |
glob | * and ? wildcards: db-*, disk:? |
exists, not_exists | for tags and details |
There are no regular expressions on purpose. This runs for every alert on the path that must never be slow, and a pattern someone pasted into a rule must not be able to hang it.
#Grouping: one page for a related burst
A node dies and thirty pod alerts follow. groupBy makes the first one page and attaches the rest to it.
await treason.routing.create({
name: "One page per cluster outage",
actions: { groupBy: ["tag:cluster"], groupWindowMinutes: 30 },
});Alerts that share the group fields join the first open alert of that group created in the last groupWindowMinutes. They are held (suppressedBy: "group:<alert id>"), the parent's timeline records each one, and they close with it. Alerts missing every grouping field are not grouped. Fields: message, alias, source, entity, priority, integration, team, tag:<name>, detail:<key>.
#Flapping
A check that opens, closes, and opens again, forever. Turn on flapping control and an alias that opens flapThreshold times within flapWindowMinutes is held for up to flapHoldMinutes:
await treason.account.updateOrg({ flapThreshold: 4, flapWindowMinutes: 30, flapHoldMinutes: 30 });It is off by default (flapThreshold: 0), because holding a page is a decision. The hold is time-bounded on purpose: if the alert is still open when the hold runs out it pages, so a check that has turned into a real outage is not silenced for good.
#Snooze
"I have seen this and will look in 30 minutes."
treason alert snooze <id> --for 30mThe alert is acknowledged now (phones stop ringing). If it is still open when the snooze ends, it pages again from the first step of the policy. Closing the alert cancels the snooze.
#Find the noise first
GET /v1/reports/noise looks at what people did with alerts in the last 30 days (up to 90): which were acknowledged, which resolved themselves, which repeat, which source is loudest. It then ranks suggestions, and many carry a ready-to-create rule:
treason report noise --days 30 # read it
treason report noise --days 30 --apply # create the rules it suggests| Suggestion | Means |
|---|---|
never_acknowledged | An urgent alert opened several times and nobody ever acknowledged it. The rule makes it push-only. |
flapping | It opens and closes within minutes, again and again. Suggests turning on flapping control. |
storm | One source opened many alerts in ten minutes. A groupBy rule makes it one page. |
repeats | Fired hundreds of times. A threshold that is too tight. |
low_acted_rate | Few of a source's alerts get acted on. |
"Acknowledged" is the signal, so the report is only as good as your team's habit of acknowledging. Read a suggestion before applying it: an alert nobody acknowledged might be one nobody noticed.
#Guarantees
- A held alert is stored before anything else, with an event saying why it is held (
suppressed) and which rule or window did it (routed,suppressed). - It de-duplicates like any alert, and a resolve from the source closes it.
- Maintenance windows and flapping holds always end in a decision: page, or (only if you chose
discard) drop. A background sweep runs every few seconds on every worker, safely in parallel. - A rule can only make an alert quieter or send it somewhere else. It cannot delete one.
suppressrecords it and says so. - Rules and windows apply to alerts from every source: native endpoints, the Opsgenie-compatible API, email and the v1 API.