Skip to main content

Pipeline

The runtime semantics of the hub: how an event becomes an alert, how an alert is routed, and what its actions do. The objects referenced here are specified in spec-format.md; the processing model (partitions, transactions, timers, tasks) is in architecture.md §4.

1. Overview​

Partition workers run the steps from Map to the alert change. Alerts that a CorrelationPattern selects and events that an ExpectRule observes go on to the correlator, which groups alerts across sources and partitions (§16) before they are routed; all other alerts are routed by their partition.

Every step is a pure function of the stored events in their order, the current alert and group state, the spec revision, the routing level and the inventory snapshot. Timers inject alert changes at their due time. That makes the pipeline replayable (§12).

Alert identity. An alert is identified by its namespace and its key. The namespace is the Source's name, or its keyNamespace when several Sources describe the same alerts (for example the two members of an Alertmanager HA pair). Alerts of kind heartbeat, storm, group, expect and self have the namespace excubio; their keys join values with / after percent-encoding % and / in each value, so different values never give the same key. The steps of §6 work within one namespace: no Source can clear, close or extend another namespace's alerts. Alert groups (§16) bring alerts of several namespaces together without clearing or closing any of them.

Open in this document means not closed: an alert in state open or acknowledged. Where only the state open is meant, it is written as code.

2. Intake​

  • Each channel parses its payload (integrations.md §1), authenticates the Source and stores one event row per contained alert (an Alertmanager group of 12 alerts gives 12 events) with the raw payload, before responding.
  • A payload over pipeline.maxEventBytes is rejected with 413.
  • Rate per Source. Each node counts the events of a Source it receives; beyond pipeline.sourceRate (per second, over 10 s) it refuses them: HTTP channels answer 429 (intake.source_rate) with Retry-After, SMTP 452, and TCP and TLS syslog are read no faster, so the senders retry or back off. SNMP and UDP syslog can't be told to wait; their excess is dropped and counted. Either way the Source raises a self-alert (architecture.md §9). The limit is per node: an HA hub of N nodes takes up to N times it.
  • Rate per hub. A hub with the limit events_per_second (architecture.md §12 Limits) takes no more, with a burst of 10 s of it: each node holds a token bucket per hub that fills at the limit divided by the installation's live nodes (the nodes whose lock connection it sees, counted every second) and holds 10 s of that. While the nodes stay the same, the nodes together take at most the limit times (the span + 10 s) over any span; a node that joins makes the others' share smaller within a second, one that leaves theirs larger within a second, and between the two the hub takes less, never more. A hub's events that all reach one node get that node's share only. A batch larger than the bucket passes a full bucket and leaves it in debt. The hub's check comes first: at the front door before a request's body is read (it then counts as one event), and again with the events' count once a channel has picked them, before they are mapped, so a refused event costs no mapping; a Source's pipeline.sourceRate applies within the hub's. Refused, HTTP channels answer 429 (intake.hub_rate) with Retry-After until the bucket holds the events, SMTP 452, TCP and TLS syslog are read no faster, and SNMP and UDP syslog, directly or through a relay, are dropped and counted; the hub raises the occurrence self/hub-rate/- (§19).
  • Daily quota. A hub with events_per_day is told at 80 % and 100 % of it (§19 Daily quota) and keeps taking events; the events above it are metered as usage, which the cloud bills. Above three times it, intake refuses the hub's events until the end of the UTC day as it refuses them above the rate, with 429 (intake.daily_quota) and a Retry-After of the time to midnight UTC, and raises self/daily-quota-refused/-. A node compares the day's events of all nodes as of its last count (at most 5 s old) with its own since, so the nodes together pass the three times by at most 5 s of their intake.
  • Usage. Each node counts the events its intake stores and refuses, by hub, UTC day and reason (hub_rate, daily_quota, source_rate), and the bytes it stores, and adds them every 5 s to the hub's row of the day; every 5 min it measures each hub's CIs, Sources, relays and stored bytes (schema/hub.sql hub_usage). The installation's provisioning sends them to the cloud (api/cloud.yaml reportUsage), the hub's API shows them (api/hub.yaml getUsage). A hub without events_per_second and events_per_day is metered and refused nothing for them.
  • Connections. Each sender address may hold at most pipeline.maxConnections TCP and TLS connections to the intake, SMTP and syslog listeners of a node; more are closed at once and counted. A syslog message over pipeline.maxSyslogBytes is cut to that length and marked truncated (integrations.md §13).
  • Store turns. A node serves at most 64 HTTP intake requests at once, and of them at most 8 hold a database connection at a time (the read of the active revision and the store of the events); the rest of a request (its body, the mapping) holds none. On a managed installation a hub holds at most 16 of the 64, beyond which its request is answered 503 with Retry-After at once, and at most 2 of the 8, for which its requests, of every channel, wait behind its own. So every hub with intake gets turns in its order, and a hub at its rate or with slow senders can't take a node's intake from the others.
  • Senders. A Source with allowFrom takes events only from those addresses: an HTTP request from elsewhere gets 403 (intake.sender_not_allowed); syslog, SMTP and SNMP senders are rejected as their channel describes. Rejected senders are counted and raise a self-alert per channel. A stored event keeps the sender's address that allowFrom judged and, when it came through a relay (architecture.md §13), that relay (schema/hub.sql event).
  • received_at is the database's clock when the event's partition numbers it, and orders all processing (architecture.md §4). A source's own time is kept as occurred_at and shown; it is used only by the late-problem guard (§6).
  • An event whose sender spooled it (excubio-msg, the SNMP spool of architecture.md §4) for longer than pipeline.maxSpoolAge is stored with outcome stale, opens no alert and raises a self-alert per Source.
  • An event that the pipeline fails on (its alert can't be written, for example) gets outcome error with the error, changes nothing else and raises a self-alert; the events after it are processed as usual.

3. Map and normalise​

  • The Source mapping turns the payload into the event fields: key, closeKey, role, severity, title, description, node, check, ci, expires, labels (spec-format.md §3.1).
  • Role says what the event means, independent of its severity: problem (something is wrong), resolution (it is fixed), info (record only), or downtime-start and downtime-end (a sender announces its own maintenance, §8). Each channel has a default role rule (integrations.md §1).
  • Severities outside the six values become unknown and are counted per Source.
  • node is lower-cased; configured domain suffixes (Settings pipeline) are stripped so that it matches CI aliases.
  • A missing key is an error (outcome mapping-error); the event is stored and opens no alert. A missing severity is unknown, a missing title is the key.
  • NUL characters in the mapped fields and labels are replaced by U+FFFD, because the database can't store them in text; the raw payload keeps them.
  • An event whose Source is not in the revision in force at its received_at (it was deleted after intake stored the event) is stored with outcome rejected; it opens no alert and is counted.
  • Two revisions. The mapped fields, and with them the namespace, the key and the partition, are those intake stored under the event's mapped_revision (architecture.md §4); no later step maps again. Everything a step reads of the Source (duplicates, the close key syntax, downtimeScope, its limits) and every other object comes from the revision in force at received_at.

4. Enrich​

  • The CI is looked up in the active inventory snapshot (§15): by ci if set (a CI ID or name), else by node against the CI aliases (exact match, then the short host name). When several CIs match at the first of these steps that finds any, the CI whose ID comes from the source first in the InventoryModel's precedence wins, then the smallest CI ID; the ambiguity is a data-quality issue (§15). Its attributes are inv.ci.*.
  • The alert's service. If the mapping set a service hint (service), the service whose name, itsm_ref or alias equals it, ignoring case, is the alert's service (inv.service.via = "hint"). Otherwise the CI's primary service is (inv.service.via = "ci"). Of several candidates, the one with the highest criticality wins, a service without one after all that have one, then the name, then the ID; a hint that matches several services is a data-quality issue. Its attributes, after inheritance from parent services, are inv.service.* (spec-format.md §2). Sources whose alerts belong to a service rather than a host, such as a container namespace, send the hint.
  • Teams. The CI's and the service's teams come from their assignment groups through the TeamMap that the InventorySource of the group names (teamMap), in the revision the event is processed with. TeamMaps apply here, not at the merge, so a TeamMap change applies from the next event without a new snapshot, and replay shows its effect (§12).
  • No CI found: inv.found = "false", no inv.ci.* attributes; a hinted service is still attached. A hint that matches no service leaves service_hint set and no inv.service.*. Neither is an error.
  • An alert is enriched at each of its changes, with the snapshot in force at the change, before its downtimes, storms and routing; it keeps the inv.* of its latest change. An event is enriched for the Heartbeats whose selectors read inv.*.
  • Enrichment never calls an inventory source.

5. Heartbeats​

  • An event that matches a Heartbeat's selector is a beat: it is consumed (stored, no alert, not routed) and updates the heartbeat state, which the correlator keeps because beats of one Heartbeat arrive in every partition (architecture.md §4).
  • A heartbeat whose last beat is older than interval + grace opens an alert of kind heartbeat with key heartbeat/<name> and the Heartbeat's severity, title and labels. The next beat clears it. The clear is routed like any clear, so recovery is visible and can be notified.
  • Channel heartbeats: every intake channel of every node that a Heartbeat watches produces an internal beat per minute while it is able to accept and store events, an event of the built-in Source excubio with the channel and the node's name as node. A Heartbeat with channel = "…" watches it with one instance per node, the hub's nodes expected (schema/hub.sql hub_node), so a dead listener on one node shows while the others still beat. A node that leaves the hub (excubio-hub leave, or excubioctl node remove for one that is gone, cli.md §6) is no longer expected: its instances are forgotten as below.
  • A new Heartbeat starts in state unknown and opens no alert until its first beat has arrived or one interval + grace has passed.
  • A Heartbeat with groupBy keeps one state per instance (the values of its groupBy attributes); the alert key is heartbeat/<name>/<values>. Instances listed in expect start in unknown like a new Heartbeat; others start with their first beat. A beat without all groupBy attributes is consumed and counted, and updates no instance.
  • A person who closes a heartbeat alert closes only the alert: a heartbeat still missing opens a new one after another interval + grace. heartbeat forget (command forget) removes the instance and closes its alert (close reason forgotten).
  • Instance limit. A Heartbeat, a StormRule (§7) and an ExpectRule (§17) each keep at most pipeline.maxInstances instances (heartbeat instances, storm scopes, expectations). An event that would add one more adds none, is counted, and the rule raises a self-alert; existing instances go on.

6. Correlate​

In this order, within the event's namespace:

  1. Copy. An event whose copy hash equals that of an earlier event is a copy (outcome copy) and is not processed further. The copy hash is the sender's message ID where the channel has one (the excubio-msg message ID, the ID of an event submitted over OBM REST, for obm-upstream the OBM event ID with its change time), compared with the events received within pipeline.maxSpoolAge, so a message resent from a sender's spool after an outage is still a copy. Otherwise it is the hash of the event's own part of the payload (one alert of an Alertmanager group, one trap PDU), compared within pipeline.copyWindow. This removes resent messages and the copies of devices that send to two hub nodes.

  2. Close key. An event with a closeKey, whatever its role or severity, closes every other open or acknowledged alert whose key matches the pattern (close reason close-key) and is remembered as a resolution of those keys for the late-problem guard. The pattern syntax is in spec-format.md §3.1. The matches are found with one query over the open and acknowledged alerts of the namespace, in all partitions:

    • a glob pattern as one anchored regular expression (key ~ '^…$', with lower() on both sides under closeKeyIgnoreCase);
    • an OBM pattern by a prefilter in SQL, then OBM's matcher on the candidates (integrations.md §2). The prefilter takes the pattern's anchored literal prefix as key LIKE 'prefix%' (index alert_open_key_prefix) and requires the pattern's literal runs (LIKE '%run%'); with closeKeyIgnoreCase it uses only ASCII literals, as lower(key) LIKE 'prefix%' (index alert_open_key_lower_prefix). A pattern with several top-level alternatives or without literals reads all open keys of the namespace.

    Matches in the event's own partition close in its step; each other partition holding a match gets a close-key command, which closes what still matches when it applies (architecture.md §4). An invalid pattern closes nothing; the event records the error and the Source counts it. A pattern that matches more than pipeline.closeKeyLimit alerts closes none of them: the event records that it exceeded the limit and the Source raises a self-alert. Closing more is a bulk close (§11). The closed alerts record the closing event's occurred_at, which the late-problem guard reads (step 5.2).

  3. Role info. Stored and counted (outcome info); no alert.

  4. Role resolution. Closes the open or acknowledged alert with the same key (outcome cleared). Without one, the event is stored as clear-unmatched. Either way, the resolution is remembered for pipeline.latePeriod.

  5. Role problem:

    1. Duplicate. An open or acknowledged alert with the same key is updated: count and last_seen always; severity, title, description and labels as the Source's duplicates policy says. A severity change is an alert change (trigger change); a plain duplicate is not. An acknowledged alert stays acknowledged.
    2. Late. If a resolution of the key is remembered and the problem's occurred_at is not later than the resolution's occurred_at plus pipeline.clockSkew, the problem arrived after its own resolution: it is stored as late and neither opens nor reopens an alert. Without both times, the problem is processed normally.
    3. Reopen. If the key's alert closed less than pipeline.reopenWindow ago, that alert reopens: trigger open, reopens incremented, its history kept.
    4. New. Otherwise a new alert opens (trigger open), unless the Source is at pipeline.maxOpenPerSource: then the event is stored with outcome limited, opens no alert, and the Source raises a self-alert. The limit guards against a runaway Source and is enforced per partition, so the outcome depends only on the partition's own events and replays alike: a partition lets a Source (the alert's source, whatever its namespace) hold twice its share of the limit (the limit divided by the partition count, rounded up), and at least 100 open alerts. The hash never spreads keys evenly, so a Source isn't limited below the setting, and can hold up to twice the setting, or 100 alerts per partition.
  • Expiry. An alert whose mapping set expires closes with reason expired when no duplicate has arrived for that long. Sources without a resolution rule use it so that their alerts don't stay open forever.
  • Every state change of an alert is recorded as a transition with its cause (event, rule, person or timer) (schema/hub.sql §4).
  • Close reasons: clear (a resolution), close-key, expired, auto-close and bulk-close (§11), person (a user or an API token), source (the sender closed the event it created through the Source's own interface, as OBM REST clients do, integrations.md §2), ticket (its ticket was closed in the ITSM, §10), storm-end (a storm alert), members-closed and merged (a group alert, §16), forgotten (a heartbeat instance, §5) and rule-removed (§20). The cloud closes no alert: an incident that a person resolves leaves its alerts open (on-call.md §3).

7. Storms​

  • New alerts that match a StormRule's selector count towards its scope (the values of its scope attributes) in a sliding window.
  • When a scope exceeds threshold new alerts in window, a storm alert opens: kind storm, key storm/<rule>/<scope values>, severity major, with the count in its description, and inherits the scope attributes (node, check, ci, service_hint and l.*; the others name the storm in its key and title). It is routed like any alert, so a team gets one page for the storm. The alert that exceeds the threshold is the first one the storm suppresses.
  • While the storm lasts, new alerts in its scope open with suppression = storm and are linked to the storm by the storm alert's key, which their partition knows when it starts the storm, before the correlator has opened the storm alert. They are stored, listed and counted, and routing records their decisions, but their page, ticket, writeback and webhook actions don't run.
  • The storm ends when the rate stays below half the threshold for one window. The storm alert closes. Linked alerts that are still open are routed again with trigger release and after_storm = "true", so ActionRules can decide whether to page for them.
  • A person who closes the storm alert ends the storm as above.
  • Duplicates don't count; they don't open alerts. Reopens count, and an alert that reopens in an active storm's scope is suppressed by and linked to that storm like a new one.
  • Storm windows span namespaces and partitions; their counters are stored per partition and minute and summed (architecture.md §4, schema/hub.sql storm_count).
    • Start. A partition counts a new alert in its own row, in its step, and sums the window over the rows of all partitions as they are committed at that moment. What other partitions count within the pipeline lag may be missing, so a storm can start an alert or a step later than the counts say; replay reports the alerts concerned as order-sensitive (§12).
    • End. The correlator decides the end at the global watermark and sums only the minutes that ended at or before it: a minute that partitions ahead of the watermark are still filling doesn't count, so the end doesn't depend on their speed (spike correlator).

8. Downtimes​

  • A downtime has a selector, CIs, or both, and a start, end, reason and notify. It comes from one of four origins: one-off from the API or UI, a DowntimeSchedule occurrence, a maintenance window of the active inventory snapshot (§15), or a maintenance event of a Source. An inventory window of a CI selects the alerts of that CI; one of a service selects the alerts whose service is it or one of its descendants. Inventory windows are listed as downtimes of origin inventory while their snapshot is active; they change with their records and never notify.
  • CIs. A downtime with cis (CI names or IDs) selects the alerts of those CIs. With both a selector and cis, an alert must match both.
  • In force. A downtime starts and ends at positions of the order, like an activation (architecture.md §4): the transaction that starts or ends it sets the downtime's effective_from or effective_to under the activation lock, by the rule of activated_at, and records it in activation_log (schema/hub.sql downtime). A downtime is in force for the events, commands and timers after effective_from and not after effective_to, in every partition and in the correlator, live and in replay; the times asked for (starts_at, ends_at) only say when that happens. A start that is due when a one-off downtime is created, and an early end, are activated by the request; every other start and end by the correlator, at its downtime-start and downtime-end timers and for the maintenance events below. So a downtime never applies to an event numbered before its start, also when it was created with a start in the past, and it begins up to the correlator's lag after the time asked for.
  • Occurrences. For each DowntimeSchedule of the revision in force the correlator holds one downtime-start timer, for the next occurrence; when it fires, the correlator writes the occurrence as a downtime of origin schedule, starts it and sets the timer of the occurrence after it. An occurrence that has started runs to its end, also when a later revision changes or removes its schedule. The windows of an inventory snapshot are written as downtimes of origin inventory when the snapshot activates, with timers for their starts and ends.
  • Alerts that open or change while a matching downtime is in force get suppression = downtime and record that downtime (the one ending last, if several match). Routing records their decisions; page, ticket, writeback and webhook don't run; notify runs only if the downtime's notify is true. An alert that is open when a downtime starts is suppressed from its next change on.
  • When a downtime ends, the open alerts that record it lose the suppression and are routed with trigger release, unless another active downtime matches them, which they then record.
  • Maintenance events. Scripts that announce their own maintenance ("begin maintenance" before a restart) keep doing so: an event with role downtime-start starts a downtime whose selector is the event's node and service hint, where set, plus the labels the Source lists in downtimeScope (for example application and object) with the event's values; a listed label the event lacks selects the alerts without it. An event without node and service hint is a mapping error. A downtime-start while that downtime is in force changes nothing. A downtime-end event with the same selector ends it; without one, it ends after the Source's downtimeMax (spec-format.md §3.1). The event's partition passes it to the correlator's inbox, and the correlator writes, starts and ends the downtime, so events that follow a downtime-start within the correlator's lag aren't suppressed yet. The downtime selects only alerts of the Source's namespace unless the Source sets downtimeAcrossSources = true, which, as every change to sources/, needs an admin approval. Event outcome downtime; downtime origin source.
  • Downtimes don't change closes: a clear during a downtime closes the alert.
  • One-off downtimes need operator in the scope of the teams whose alerts they match. Before creation, the hub returns, per team, the open alerts the selector matches now and the alerts it would have matched over the last 7 days; both decide the teams and the size. An empty selector is rejected. A downtime longer than pipeline.maxDowntime (from its start or from its creation, whichever is later), or matching more than pipeline.wideDowntime alerts by either count, needs admin, and so does ending it early. Starts and ends of one-off downtimes that needed admin or were created by a person raise a self-alert of severity warning, so a silenced hub is visible to the platform team. Downtimes from automation (patch runs, deployments) are frequent and narrow; they are listed and counted (excubio_downtimes_active{origin}), and their service accounts can be restricted to a selector, for example to the nodes they patch (architecture.md §10).

9. Routing evaluation​

For every alert change (open, change, close, release, calendar, hold, group):

  1. Facts. team, service, oncall and notify are evaluated in this order by the Classify rules (spec-format.md §3.8). Each fact can use the ones before it.
  2. Actions. ActionRules whose on contains the trigger run by ascending order; each matching rule adds its actions, until a stop rule or a drop action matches.
  3. Decision. The facts, the actions, and a trace (every rule evaluated, whether it matched, and the attribute values it read) are stored as the alert's routing decision with the revision, the routing level and the snapshot. The alert's current facts are updated.
  4. One decision per alert change. When the decision of a release, calendar, hold or group trigger, or of a change after a newer snapshot, changes a fact, the decision carries both its own trigger and change; each rule runs once if its on contains either. open and close never add change.
  5. The trigger group routes an alert again when it joins, moves to or leaves an alert group after it was routed (§16).
  6. Suppression. The downtime and the storm that suppress an alert are stored apart, both by its partition (architecture.md §4). The alert's suppression is the first that applies, downtime before storm. When one ends, the other takes its place if it still applies; only when none is left is the alert routed with trigger release.

The hub never re-routes all open alerts when a revision or a snapshot changes. New decisions apply from the next change of each alert. The scheduled re-evaluations are the calendar trigger: at a coverage change of a Calendar, only the open alerts whose current decision read it are routed again (spec-format.md §3.17); and the hold trigger. A decision records the Calendars its rules read on the alert; the correlator keeps a timer at each Calendar's next coverage change and, when it is due, writes a calendar command to every owner, which routes again its open alerts that recorded the Calendar (architecture.md §4).

Held rules. A decision with held actions (the fields: spec-format.md §3.9) starts their runs in state held and sets a timer at the end of for; occurrences within within are counted from the alert's stored events: the first problem, its duplicates and reopens. While held, the actions don't run; the decision records them as held with the condition. The hold trigger fires at the timer, or at the duplicate or reopen that brings the occurrences within within to count, whichever comes first, if the alert is still open and unacknowledged. A duplicate that fires it is an alert change, unlike a plain duplicate (§6). The alert's owner counts the occurrences and runs the timer; for an alert the correlator routes, the hold trigger goes to its inbox like any of the alert's changes (architecture.md §4).

  • A rule with hold runs on its own hold trigger whatever its on says.
  • At the hold trigger, each held run whose own condition is met (its for has ended, or its count is reached within within) and whose rule still matches starts: the held run gives way to a run of the next number, which starts as any run does. A held run whose own condition isn't met holds on, so one hold's timer or count starts no other hold's actions; a held run whose rule no longer matches is cancelled. Actions of other rules start only if they aren't running already (§10).
  • Another rule that yields the same action without hold starts it at once. A rule with hold and stop = true stops later rules at once, also while it holds.
  • The held runs are cancelled when the alert closes or is acknowledged, and a held run when a later decision evaluates its rule and no longer holds its identity; a decision that doesn't evaluate the rule (a change for a rule on open only) keeps it. The timer is then set at the earliest end of for of the held runs left, or removed. An un-ack holds nothing again: the alert's next decision that holds the actions starts new held runs.

10. Actions​

Actions run as durable tasks after the decision commits.

ActionBehaviour over the alert's lifecycle
pageopen: a page request for the rotation with the grouping key (the values of groupBy; without groupBy, or when the alert has none of its attributes, the alert's ID, so that the alert is an incident of its own) and the payload (on-call.md §3); for a group alert also the involved teams (§16). change: the incident gets the alert's current severity and title; a title that a duplicate changed, which is no alert change (§6), travels with the alert's next change, here and in the follow-ups of ticket, webhook and writeback. close: the alert is reported closed; the incident resolves when all its alerts are closed (on-call.md §6). An ack or snooze of the incident, from the cloud or by acking one of its alerts in the hub, sets all its open alerts to acknowledged; an un-ack sets them back to open. An alert that belongs to several incidents (its page and attach runs, involved rotations paged) is acknowledged while any of them is; an ack in the hub is sent to each of them.
ticketopen: creates a ticket with the TicketProfile, or joins an open one of the profile's groupBy; the ticket ID is stored on the alert. close: as onAlertClose, once the ticket's last alert has closed; the ticket is then released whatever onAlertClose says, so later alerts of its groupBy open a new ticket. A ticket closed in the ITSM closes its alerts if onTicketClose = "close-alert". At most one ticket per alert.
writebackSends alert state changes (acknowledged by whom, paged, ticket ID, closed) to the alert's source (integrations.md §6).
notifyimmediate: an e-mail when the run starts, then one per follow-up change and close; the triggers release, calendar, hold and group send none for a running run. digest: the same messages, collected per recipient and sent every interval.
webhookThe alert's alert.*, group.* and ticket.created events that the Webhook subscribes to (integrations.md §8). With a Webhook of mode digest: none; the alert is listed in the Webhook's digest while the run lasts (below).
attachA member's page in a group with members = "attach": once the group alert's page has been accepted, the member joins the group's incident without a message ("+1 alert"); without one, the member's page runs (§16). Changes and the close follow as for page.
dropNothing runs; the alert is marked dropped with the reason.
  • Action runs. An action's identity within its alert is its type and target: page the team and rotation, attach the group, ticket the TicketProfile, notify the recipients and mode, webhook the Webhook, writeback the source. The first decision that contains an identity starts a run of it; a later decision that contains the same identity continues the run, whichever rule produced it, and starts nothing. When one rule of a decision holds an identity and another yields it without hold, the run starts at once. A run follows the alert as the table above says: its changes and its close are follow-ups of the run, not new actions.
  • A run continues when a later decision no longer contains its identity: a page is not withdrawn because the severity dropped. A later decision starts runs for identities that have none (for example a page on escalation from minor to critical). So on a calendar trigger, an alert that was e-mailed during office hours pages at their end without a second e-mail, and a hold trigger starts only what isn't running yet.
  • A run ends with its target: a page's when its incident resolves, a ticket's when the ticket is resolved, closed or released, the others when the alert closes. A later decision with the identity then starts a new run: a reopened alert that is still part of an unresolved incident rejoins it, otherwise its page opens a new incident. ActionRules can use reopens to stop paging for a flapping alert.
  • A run that failed (its start gave up after the retries below, or the cloud refused its page) has ended: the next decision with the identity starts a new run.
  • A held action (spec-format.md §3.9) is a run waiting for its condition (§9). Actions that are suppressed (downtime, storm, shadow mode) are recorded in the decision and start no run, so the decision after the release starts them. Shadow mode has no release: when a team leaves it, its open alerts aren't routed again, and an alert's next decision starts the actions it has no run of (migration.md §2).
  • The idempotency key of a run is the alert, the identity and the run's number; each follow-up adds the alert version it reports.
  • Synthetic test. A test request from Watch (watch.md §1) becomes an alert of kind self with check excubio-synthetic, key synthetic/<test ID>, the test code in its title, the test ID as label test_id and expires of 10 min; the node that got the request stores it, and tries again with its next heartbeats for 5 min while it can't. A built-in rule routes it before the ActionRules, at every routing level and outside shadow mode: on its open it pages the rotation synthetic of the reserved team excubio with the test ID as grouping key, and nothing else runs. A page to that rotation that the cloud refuses isn't re-routed to routing.unroutedTeam: the self-alert of the refusal is raised, and Watch fails the check without a receipt. Downtimes and storms don't suppress it, and no pattern groups it. Each test therefore has its own incident, which resolves when the alert expires (on-call.md §6).
  • Manual pages from the hub (manualPage, on-call.md §9) are stored, with the caller and an audit event, in the request's transaction (schema/hub.sql manual_page). Each is a run of its own: its page request is an up message with the idempotency key manual/<id> (architecture.md §5), so a repeated request and a resend after a cloud restore page once, and without the cloud it goes through the local fallback channel like a page run (architecture.md §7). A 422 from the cloud fails it and raises a self-alert; it isn't re-routed. An alert_id shows it in the alert's view and changes nothing about the alert. Its state and its incident are read with getManualPage (api/hub.yaml).
  • The tasks of a notify, ticket, webhook or writeback run send its messages in order, one task at a time (architecture.md §4 class 8), each with the idempotency key of the run or follow-up, which the target gets as the ticket message's id (an sm9 create: in the profile's keyField, integrations.md §5) or the event's id. An e-mail, one per message and recipient, has its own id as the left part of its Message-ID (a digest: digest- and its first e-mail's id), the same at every attempt; the key, which holds the recipient's address, can't be one. A notify run with mode immediate sends its e-mails; with digest it only collects them. A run ends when its last message after the alert's close is sent (ticket runs: with their ticket).
  • A Webhook's digest. A webhook run of a Webhook with mode digest (spec-format.md §3.13) sends nothing; it ends when the alert closes. Its start and the alert's changes start the Webhook's interval when none is running (the timer of kind webhook-digest, schema/hub.sql timer); a close starts none. At the interval's end one message lists the alerts whose run of the Webhook is still running then, so an alert that closed within the interval isn't listed, and with a hold an alert that closed before its hold was met had no run and never appears. With no such alert nothing is sent. An alert stays listed in each digest while it is open; a digest is sent only for an interval in which an alert opened or changed.
  • Fairness. Each node runs its tasks in four pools, each with a cap on the node and a share per hub: page requests to the cloud, automatic and manual (16 on the node, 4 per hub); the other actions (notify, ticket, webhook, write-back: 16, 4); the management API's operations (replays, validations, exports, bulk closes: 8, 2); inventory imports, merges and quality digests (4, 1). On a standalone installation its one hub takes a whole pool. A page never waits for another action. A task claimed beyond its pool's cap or its hub's share is put back until a slot is expected to be free: the tasks put back of one hub (or of a full pool) follow each other at the time a task of theirs took on average divided by the cap, at least 0.5 s and at most 5 min, so a backlog comes back at the pace it can run instead of being claimed again and again; claims grow (up to 256) while most of a claim is put back, so a backlog of thousands is swept in a few claims. One hub's backlog against a slow or dead target thus runs 4 at a time on each node, and the rest of the pool stays for the other hubs; measured with 10,000 due sends of one hub to a target that never answers: about 11 claims and 11 tasks put back a second, and another hub's page request reached the cloud 0.15 s after its event (architecture.md §11 Egress bounds a hub's connections besides).
  • Failed tasks retry with exponential backoff (1 s to 15 min, for 24 h from a task's first attempt; the link's up messages retry until the cloud confirms, architecture.md §5). After 5 failed attempts, a self-alert names the action type and target; a task that still fails after 24 h gives up: its run fails, and the self-alert is raised again.

11. Auto-close and bulk close​

  • An AutoClose rule closes matching open alerts whose since time is older than after. The close reason is auto-close, and the close detail names the rule. When several rules select an alert, the one that closes it first does. Rules select with the alert's attributes and the facts of its latest decision, as they are after each change.
  • Bulk close by selector through the API or UI needs operator in scope. The hub first returns the count; the close then runs as one operation, limited by pipeline.bulkCloseLimit, which writes its commands in one transaction and closes the alerts that matched then (architecture.md §4). It can be cancelled only while it is queued; once its commands are written, they apply. One audit event records the selector, count and reason; each alert records the close reason.
  • Closes by people, rules and bulk close are alert changes with trigger close.

12. Replay​

Replay evaluates a revision against stored history:

  • Queue. A hub runs one replay or validation at a time (schema/hub.sql operation); another waits as a task put back in the queue, holding nothing, and the nodes run operations within their pool's caps (§10 Fairness), so each hub's replays queue behind its own. A node opens at most 4 sandboxes at once (Sandbox, below).
  • Input: a time range of events (default routing.replayWindow, at most the hub's replay_window_days, architecture.md §12 Limits; a longer range asked for is refused with 403 hub.limit_exceeded), a candidate revision and level, a baseline revision (default the active one), and the snapshot that was active at each event (default) or the current one. A preview can limit its output to the alerts a selector matches or to teams; the run is the same.
  • Route-only replay. Lifecycle and grouping don't read routing facts (spec-format.md §3.19). When every object the candidate changes is a Classify, ActionRule, TicketProfile, the InventoryModel, an InventorySource, Settings routing or inventory, an object no decision reads (RoutingTest, ApprovalPolicy, Secret), a ValueMap that no Source of either revision names, or a TeamMap while no selector evaluated before routing (spec-format.md §2) and no CorrelationPattern of either revision reads inv.ci.team or inv.service.team, the partition steps aren't run again: both revisions share the lifecycle the live steps produced, and each stored decision's input (the attributes it routed, schema/hub.sql routing_decision.trace) is routed under both, its inv.ci.team and inv.service.team mapped again from its groups by each revision's TeamMaps (the decision's trace keeps the sources of the groups), and the groups (members, roles, causes, merges) are those of the stored group history, as live formed them (schema/hub.sql alert_group_member, alert_group_cause). A ValueMap that a Source names decides its events' roles, and a team attribute read before routing decides suppression and grouping, so those changes take the full replay, and so do a Calendar and an ActionRule with a hold in either revision, whose calendar and hold triggers follow from the alerts' times. Only routing (§9) and what follows from decisions (attach and its fallback to the member's page) run for each revision.
  • The InventoryModel, the InventorySources and Settings inventory take effect at the next import and merge (§15), and replay uses the stored snapshots, so their impact is not replayed: the result names the change as not replayed, and the first two need an admin approval (spec-format.md §3.18).
  • Full replay. A candidate that changes anything else, such as a Source, StormRule or CorrelationPattern, runs both revisions through the partition steps and the correlator. Its range holds at most routing.replayMaxEvents events (spec-format.md §3.16): of a longer range, replay takes the latest events up to that count. The baseline takes each event's stored mapped fields (§3); the candidate takes them too, except for the events of Sources it changes, which it decodes and maps again from the raw payload, with the key and partition its mapping gives.
  • Start state. The run starts from the alerts that were open or acknowledged at the range's first event, so a duplicate of an alert that opened before the range stays a duplicate. The stored transitions say which alerts those are; the stored events of each since it opened or last reopened, which don't count towards routing.replayMaxEvents, run first through the same steps under each revision, which rebuilds the alert (state, severity, suppression, title, labels, count, last_seen, expires, inv.*) and its group, and only the decisions from the range's first event on are compared. An alert whose opening event has left the event retention is rebuilt from the events that remain and reported as truncated. The correlator's state (Heartbeat instances, storm counts, expectations, forming groups) is rebuilt the same way from the events of the longest of its bounds before the range (twice a Heartbeat's interval plus grace, a StormRule's or CorrelationPattern's window, an ExpectRule's within, of either revision, at most 7 days), at most routing.replayMaxEvents of them. A group is named in the comparison by its pattern, groupBy values and first problem, which each run forms alike, not by its alert's id.
  • Run: events are processed in their order, in a sandbox (below), the hub's alone: on a managed installation a hub's positions in a partition have gaps where other hubs' rows were numbered, which mean nothing and which replay doesn't fill (architecture.md §4 Determinism per hub); with the revision and snapshot of the activations before each event (architecture.md §4); timers fire at their simulated times, before the events after them. Commands that the pipeline derives (close keys for other partitions, releases, Calendar coverage changes) apply at the position of the event or timer that derived them. The correlator takes its input in the same order as live. Nothing is written except the result.
  • Sandbox. A full replay, the RoutingTest cases of steps (spec-format.md §3.15) and the explanation of hypothetical events (§13) run the hub's own partition steps and correlator in a sandbox: one session of the hub's database whose temporary tables stand in for the tables the pipeline writes (alerts, events, commands, decisions, runs, groups, storms, downtimes, timers, owners, activations), empty when it starts, while revisions, snapshots and replicas are read as they are. The session's transactions are read-only for every other table, which the database enforces, so nothing reaches the live hub. Its steps take their time from the sandbox's clock, which the run advances event by event, stopping at every timer due in between; after each advance the partitions with work and then the correlator step until neither leaves work for the other. A run starts no task: its actions are recorded in its decisions and runs only, and it counts nothing in the node's metrics. A sandbox lives as long as its run and is the run's own; a node runs at most four at a time, each a database session beside its pool. Replays, validations and the cases of steps hold at most three of them and wait for one in turn, so one is always left for explanations, which are interactive; a hub has at most one explanation in a sandbox of a node at a time, and its next waits for it. An explanation thus waits only for other hubs' explanations, at most 5 s, and runs at most 60 s, else it is answered 503.
  • Output: the mode and the range replayed (first and last event, event count); per alert key, the decisions of both revisions where they differ, classified as in spec-format.md §6; and a summary per team and rule, including the rules of the candidate that matched no event in the range.
  • Replay runs as an operation on any hub node, with at most one replay running at a time per hub. A submit's validation (spec-format.md §4) never waits for a preview: it cancels a running preview replay, whose operation ends cancelled. Validations queue and run in submit order; a preview is refused while a replay runs or a validation waits. Mapping errors, CEL runtime errors and invalid close key patterns are reported per Source.
  • Order-sensitive alerts. Live, partitions run side by side, so effects that cross partitions (a close key's command to another partition, storm counts) of events received within the pipeline lag of each other can apply in a different order live than in replay. Replay reports as order-sensitive the alerts concerned (closed by a close key or suppressed by a storm in either run) and, in a full replay, every alert that shares a group with one of them and every member of a group that correlation.maxGroupSize limited. With groups of hundreds of members this can be most of the alerts in the range.
  • Commands from people and the cloud link (acks, closes, manual group changes) are state, not spec; replay doesn't repeat them and reports the alerts concerned as manual. Downtimes of people, automation and the inventory are state too: they apply as stored, started and ended at their effective times (§8). The occurrences of DowntimeSchedules and the downtimes of maintenance events each revision derives from its own objects and events. A route-only replay keeps the manual group changes of the stored group history and reports them as manual too.
  • What replay doesn't show. The InventoryModel, the InventorySources and Settings inventory act at imports and merges, which replay doesn't run (above). Events that intake refused or never stored (allowFrom, sourceRate, maxConnections, an unknown token) aren't there to replay, so a candidate that lets more in shows nothing of it. An event of a Source the candidate changes whose raw payload has left its retention (compliance.md §2) can't be mapped again and is counted among the errors. What the cloud does with a page (incidents, escalation, responses) and what the other actions' targets answer are no part of replay: runs are compared as the decisions start them.
  • Output differences are stored per alert key and first event (schema/hub.sql replay_diff) with the decisions of both revisions, their classes and flags, and listed with listReplayDiffs (api/hub.yaml); a preview limited to a selector or teams stores those of its alerts only.

Change set validation (L3) and migration equivalence on the events of shadow mode (migration.md §3) use replay; while the incumbent's records cover the range, a replay is full.

13. Explanation​

Every decision can be rendered as an explanation from its trace:

Paged perimeter/primary because ActionRule page-oncall (order 100) matched: notify = true (Classify notify-default), oncall = true (Classify oncall-from-service: inv.service.hours = 24x7), rank = 4, greater than 2. team = perimeter from Classify team-from-inventory (inv.service.team, via TeamMap groups: "Perimeter Security"). Revision r42, level 1, snapshot 2026-10-22T08:15Z.

  • For actions that did not happen, the explanation lists the ActionRules that could have produced them and the first condition that failed; a rule after a stop or drop is named as not evaluated.
  • Every explanation names the alert's suppression (the downtime, the storm or shadow mode) and the decision's trigger.
  • For events that opened no alert (copy, info, beat, downtime, late, stale, limited, clear-unmatched, rejected, mapping-error, error), the event view names the step and the event it matched, or the error.
  • A group alert's explanation names the pattern, the probable cause and why it was chosen (the causes selector it matched, or the tie-break), each member with its role, and the involved teams (§16). A member's explanation names its group and what its membership did to its actions.
  • POST /api/v1/explain explains a hypothetical event or event sequence against any revision without storing it (api/hub.yaml): it runs from an empty state in a sandbox (§12), as a RoutingTest case of steps does, and shows each step's outcome, alert and decisions of the teams the caller sees.

14. Conformance sequences​

The hub's test suite and every routing level pass a fixed set of timed event sequences, run both live and in replay, with identical results. Live, the sequences that complete within seconds go through intake on an HA test hub with a node killed mid-sequence; those that wait for windows of minutes (reopen, downtimes, holds, storms, Calendars, expectations, heartbeats, groups) run through the live steps on a simulated clock (stack.md §7):

SequenceExpected
problem, duplicate, duplicate with higher severity, resolutionone alert, one change, closed clear
resolution, then the problem with an earlier occurred_atno alert; problem late
resolution, then the problem with a later occurred_atthe problem opens an alert
an excubio-msg message, then the same message resent from its spool with the same message IDone alert, count = 1; the resend is a copy
problem, resolution, the problem again after reopenWindowtwo alerts; the second has reopens = 0
problem, then three times a resolution and the problem again within reopenWindow (four problems, three resolutions)one alert, open, reopens = 3
the same trap at two nodesone event processed, one copy
problem during a downtime, downtime ends, resolutionsuppressed decision, release, close
60 problems on one node in a minute, then quietone storm alert, linked alerts, release at the end
heartbeat beats, pipeline paused past interval + grace, beats resumeno missing-heartbeat alert
problem in Source A, resolution with the same key in Source BA's alert stays open
problem with closeKey matching a warning's keywarning closed close-key, problem open
problem at 16:50 routed by a 07:00–17:00 Calendar, still open at 17:00calendar trigger at 17:00, one new decision
problem under a rule with hold.for = 5m, resolution after 3 minheld decision, closed clear, no page
problem under a rule with hold.for = 5m, still open after 5 minhold trigger at 5 min, one page
problem under hold.count = 3, within = 10m, duplicates at 4 and 8 minhold trigger at 8 min, one page
problem under hold.count = 3, within = 10m, duplicates at 4 and 15 minno page; occurrences never reach 3 within 10 min
watchdog beats of two clusters, one stopsone missing-heartbeat alert for that instance
a hypervisor down, then 12 VM and application alerts with its l.cluster, from three Sources in three partitions, within the window, under a pattern with groupBy = ["l.cluster"] and the hypervisor class first in causesone group alert routed after wait; the hypervisor alert is the cause; 12 members attached; one page
the same with the VM alerts arriving before the hypervisor alert, within waitthe same group, cause and page
two alerts with the same l.cluster 40 min apart under a pattern with window = 30mtwo groups
a start event of an ExpectRule, no follow-up within within, then the follow-upan expect alert, then cleared

15. Inventory​

The inventory is what the hub knows about the customer's estate: CIs, services, ownership and maintenance windows. Excubio discovers nothing itself: InventorySources (spec-format.md §3.10) read it from the systems that already hold it, CMDBs and ITSM tools (integrations.md §14).

  • Imports. Each InventorySource imports on its schedule (due once its newest import started a schedule ago), or on demand, into an import: its records normalised to CIs (class, name, aliases with their kind, attributes, assignment group), services, CI–service links and maintenance windows, stored as one compressed blob (schema/hub.sql §3). An import whose content equals the source's last good import is not stored again and changes nothing; it counts as the source's newest import. An import that fails its source's guards (spec-format.md §3.10) is rejected; the source's last good import stays in use and a self-alert names the source (self/inventory-import-rejected/<source>). A read that fails is rejected alike, and so is a read or upload with more CIs than inventory.maxCis or the hub's cis limit, whichever is lower (architecture.md §12 Limits), which stops reading there and never stores a truncated import; a merge whose snapshot holds more CIs than the cis limit is rejected like one that fails the Settings guards. The source's next import that isn't rejected (accepted or unchanged) ends the alert with a resolution event, on whichever node runs it; an import after that one stores nothing. Each node looks for due imports every 30 s, the first time 30 s after it starts, by when the relays that reach it have connected again (architecture.md §13 Deadlines).
  • Merge. The hub merges the last good import of every source into a new inventory snapshot at most once per inventory.mergeInterval (spec-format.md §3.16): an accepted import with changed content starts a merge when the interval has passed since the previous one, otherwise at its end, and every import accepted in the meantime is merged with it. An import on demand merges at once. A merge whose result equals the active snapshot makes none, and a merge whose imports are those of the active snapshot doesn't run. A merge that the guards below or a cycle of services reject is a snapshot of state rejected with its report, and raises a self-alert (self/inventory-snapshot-rejected/-); the active snapshot stays. The merge is a function of the imports and the InventoryModel (spec-format.md §3.18):
    1. Identity. Records of different sources are one CI when they share an identity key of a kind listed in the model's merge (default fqdn, serial, vm-uuid and ref, a source's explicit reference to another source's ID). The kinds ip and host (short host name) never merge; they stay aliases for matching events. Merging is transitive. A key value that two or more records of one source share doesn't identify within that source: it joins none of those records, but still joins the other sources' records that have it, and the snapshot report lists the records as ambiguous. The model's placeholders (values such as the serial "to be filled by o.e.m.") never identify and are no aliases. A CI that would still hold two records of one source is ambiguous: its records stay separate CIs, and the snapshot report lists them.
    2. Attributes. Each attribute comes from the first source of its precedence list that has it (spec-format.md §3.18).
    3. Classes. Source classes map to Excubio's CI classes (host, vm, hypervisor, compute-cluster, k8s-cluster, k8s-node, namespace, workload, container, application, database, middleware, network-device, load-balancer, firewall, storage, datastore, cloud-resource, site, other); a class without a mapping is other.
    4. Services of different sources merge by itsm_ref, else by name ignoring case. A service with a parent inherits the attributes it lacks from its nearest ancestor that has them; a cycle in the hierarchy rejects the merge.
    5. CI IDs. A new CI gets the source-qualified ID of its record from the first source in precedence (servicenow/9f1c…). It keeps the ID while any of its records remains, whichever records come and go and however the precedence changes. CIs that merge keep the ID of the one whose record is first in precedence; when a CI splits, the part with the record first in precedence keeps the ID and the others get new IDs as new CIs do. Which records make up each CI is kept outside the snapshot versions.
  • Maintenance windows of the snapshot become downtimes of origin inventory when it activates, with the window's id and the timer of its start; a window that changes moves its downtime's times, and one that a later snapshot no longer has ends its downtime then, or removes it before its start (§8).
  • Snapshot. Snapshots are immutable and numbered. Each event is processed against the snapshot activated before its received_at (architecture.md §4), and every decision stores it. The settings inventory.minCis and inventory.maxChange guard the merged snapshot as a whole. The snapshot report shows, per source, its records, how many merged, the ambiguous ones, the placeholder values it ignored and unmapped classes.
  • Storage. A snapshot is stored as its changes: the merge compares its result with the active snapshot and writes only the CIs, aliases, services, links and maintenance windows that were added, removed or changed, as versions valid from the new snapshot's number; the ended versions move to history tables partitioned by day (schema/hub.sql §3). A version holds what the snapshot describes, not which source records it came from, so a source that sees a change later than the others creates no further version. A merge without changes makes no snapshot. History older than the inventory history's horizon (compliance.md §2) is dropped by the day; the snapshots before it are then expired. Imports are kept only as the last good import of each source, which the next merge reads; replay and the snapshots read the versions, not the imports (schema/hub.sql §3). Decisions keep their snapshot's ID, and their traces hold the attribute values they read, so explanations don't need the expired snapshot.
  • Replay loads the snapshot active at the start of its range and applies each later snapshot's changes when it passes that snapshot's activated_at, so it holds one snapshot besides the active one (operations.md §10). It reads the changes in batches of snapshots (a day's at a time), not one query per snapshot.
  • Data quality. Each snapshot reports, per assignment group of the CIs and services concerned: events whose CI wasn't found (with the node or CI they named), events whose node, CI or service hint matched several CIs or services (§4; the decision's trace marks them), assignment groups without a TeamMap entry in the active revision, values of attributes that Classify maps through a ValueMap and that the ValueMap doesn't contain, services without a team, and ambiguous merges. With Settings inventory.qualityDigest (an interval), every team gets the issues of the groups it is mapped from by e-mail digest, and routing.unroutedTeam those of unmapped groups, so that the issues are fixed where the inventory is kept: one e-mail per team with issues, to its mail address, through the relay of Settings notify, every interval counted from midnight UTC.
  • Enrichment and downtimes read the snapshot in memory; they never call a source. A source that is unreachable keeps its last good import; a self-alert fires when its newest import is older than inventory.maxAge.

16. Alert groups​

Alert groups bring related alerts of any Source together, so that one outage gives one page that names its probable cause. CorrelationPatterns (spec-format.md §3.19) say which alerts belong together: those a pattern selects that share the values of its groupBy attributes within its window.

  • Correlator. Grouping runs in the correlator, a stage after the partitions that one hub node runs at a time (architecture.md §4). It takes the changes of alerts that a pattern selects and the events that an ExpectRule observes (§17), in (received_at, partition, seq) order (architecture.md §4), once every partition has processed past that time. It routes the alerts it takes. Each member's attributes as of its latest change that the correlator took are kept with its membership (schema/hub.sql alert_group_member); the cause, the group's severity and its roles are chosen from them, not from the alert as its partition may have changed it since.
  • Selection. Whether any pattern selects an alert is decided when it opens or reopens; the correlator, or its partition, then routes it until it closes (architecture.md §4). Pattern selectors read the attributes an alert has before routing; facts, calendar.* and group.* are not available to them (spec-format.md §3.19).
  • Joining. For a new or reopened alert, the patterns are tried by ascending order; the first pattern that selects the alert decides:
    1. The alert joins the open group of the pattern that accepts it: the alert's first problem is within the pattern's window of the group's first member, and it has the group's values of the pattern's groupBy attributes.
    2. Otherwise it opens a new group. An alert that lacks a groupBy attribute isn't grouped by that pattern, and the next one is tried. An alert without any group is routed by itself. An alert belongs to at most one group and stays in it until it closes. A reopened alert is grouped again like a new one, also when the group it left is still open; the first problem compared with the window is then the problem that reopened it.
  • Group alert. A group is an alert of kind group, namespace excubio, key group/<pattern>/<id>. Its severity is the highest of its open members; its title, node, CI, service, labels and inv.* attributes are those of its probable cause, and its title carries the count ("esx-04 down (+11 related)"). The group.* attributes (spec-format.md §2) describe the group. Classify and ActionRules route it like any alert, with the triggers open (when the wait ends), change (severity, cause or a fact changed) and close. Its page goes through the rotation's grouping and storm guard like any page (on-call.md §3). Group alerts and expect alerts belong to the correlator, not to a partition.
  • Wait. A new group is routed when the pattern's wait (spec-format.md §3.19) after its first member has passed, so that the cause and the other members can arrive first. A group whose members all close during the wait closes without being routed.
  • Probable cause, chosen again whenever the members change:
    1. the open members that match the first of the pattern's causes selectors that any open member matches; without such a selector, all open members;
    2. of these, the one with the highest severity, then the earliest first problem, the namespace and the key. The cause has the role cause, the other members the role member. When the cause changes after the group alert was routed, the group alert is routed with trigger change; a page already sent stays with its rotation, whose incident shows the new cause, and the new cause's team becomes involved (below).
  • Members. Each member is routed with its own facts: a new or reopened alert with trigger open once it has joined, an alert that joins, moves or leaves later (a merge, a manual change) with trigger group. The pattern's members decides what its actions do:
    • attach (default): a member's page actions become attach (§10): the alert joins the group's incident without a message. They wait for the group alert's routing; if the group alert's decision has no page, or its page fails, the member's own page runs instead, so grouping never loses a page. Its other actions run.
    • route: members are routed as if they had no group; only the group's own actions are added. For combinations (below) and for watching a new pattern before it acts. TicketProfiles can group the tickets of a group with groupBy = ["group.id"].
  • Involved teams are the teams of members other than the group alert's team (that of its latest decision; before its first, its cause's), and group.teams counts them. A page of the group alert carries them, and the cloud informs their rotations (on-call.md §3), or pages them when the action says involve = "page".
  • End. A group accepts no members once the pattern's window from its first member has passed. The group alert closes when all its members are closed (close reason members-closed). A group alert closed otherwise (by a person, bulk close or AutoClose) ends the group: its open members leave it and are routed with trigger group.
  • Manual changes. A responder in the alert's scope can detach an alert from its group (it is then routed by itself and doesn't rejoin) or move it to another open group; an operator can merge two open groups of one pattern. Each change is audited and appears in the explanation. A detached alert leaves the group's incident, and its own page opens or joins an incident as usual; a moved alert leaves the old group's incident and joins the new group's.
  • Merge. The younger group's members move to the older group, the oldest members first, until it holds correlation.maxGroupSize; a younger group whose members all moved closes with reason merged, and its incident is merged into the older group's incident. A younger group whose members don't all fit keeps the rest and stays open, and the members that moved leave its incident.
  • Cloud. Changes of a routed group (cause, members, involved teams) are sent up the link to its incidents (architecture.md §5).
  • Combinations. A pattern's roles name sub-selectors; the group attribute group.has.<role> is "true" while an open member matches one. With members = "route", an ActionRule on the group alert pages only for a combination, such as a database and its application failing within 10 minutes.
  • Similar groups. The group view lists up to five earlier groups within retention with the same pattern and the same cause key or cause CI, with who acknowledged them, their duration and their shared notes.
  • Limits. A group holds at most correlation.maxGroupSize members (spec-format.md §3.16), also after a merge; further alerts that would join are counted on the group and routed by themselves. At most correlation.maxOpenGroups groups accept members (forming, or open within their window); beyond that, alerts that would open a group are routed ungrouped and a self-alert fires. Groups past their window that stay open for their remaining members don't count.

17. Expectations​

An ExpectRule (spec-format.md §3.20) raises an alert when a follow-up event doesn't arrive after a start event: a backup that started and didn't finish, a batch run without its end message.

  • The correlator observes the events that match the rule's start or then selector, whatever their outcome; observing doesn't consume them.
  • A start event opens an expectation for the values of the rule's correlate attributes, due after within. A further start event of the same values restarts it; an open expect alert of those values stays open until a follow-up clears it.
  • A then event of the same values before the due time ends the expectation. At the due time without one, an alert of kind expect opens with key expect/<rule>/<values> and the rule's severity, title and labels; a later then event clears it. A person who closes it ends the expectation.
  • Timers of expectations fire when every partition has processed past their due time, as heartbeat timers do (architecture.md §4).

18. Hygiene​

Per team and time range, the hub reports what wears the team out and what it can change:

  • pages, and of them those cleared by their source before an ack, unanswered ones and those out of hours (decided outside Monday to Friday 07:00–17:00 in Settings routing.timezone; the hub knows neither the tenant's office hours nor its holidays, on-call.md §2);
  • the checks and nodes that caused the most alerts and pages;
  • pages from stages outside routing.pageStages (spec-format.md §3.16);
  • e-mails per recipient, and checks whose e-mails were never acted on;
  • alerts open longer than routing.staleAfter, and closes by people in bulk;
  • unrouted alerts by reason, and the team's inventory data-quality issues (§15).

An alert was acted on when a person acknowledged, annotated, assigned or closed it, or it had a ticket.

19. Self-alerts​

The hub's alerts about itself (the conditions: architecture.md §9) go through the pipeline like any alert:

  • Entry. A condition stores an event of the built-in Source excubio (not in the spec), channel self, with the active revision as mapped_revision and the fields built in: namespace excubio, key self/<kind>/<subject> (for example self/source-rate/<source>, self/partition-unowned/<partition>), the condition's severity (warning unless architecture.md §9 names another), and check = <kind>. Its copy hash is unique, so no event of it is a copy. It is numbered and correlated in its key's partition like any event and opens an alert of kind self; repeats are duplicates of it.
  • Routed by their partition. No CorrelationPattern selects an alert of kind self, no StormRule counts it and no downtime or storm suppresses it, so a self-alert never waits for the correlator and is never silenced with the alerts it is about.
  • Conditions of the hub (an inventory source stale, self/inventory-stale/<source>, snapshot age, correlator lag, task backlog; relays, architecture.md §13: an enrolled relay without a control connection to any node for 5 min, self/relay-disconnected/<relay>; relays enrolled and none connected for 2 min, self/relay-none/-, critical; a relay's spool above 80 % of its size or dropping datagrams, self/relay-spool/<relay>) are checked every 30 s, and those of the link every 2 s (link down for fallback.after, self/link-down/-, critical, with its cause; the fallback active with a channel, self/fallback-active/-; the fallback account failing a bind, self/fallback-account/-; architecture.md §7), by the node that holds the lock of the hub's link shard (architecture.md §4), so one node decides for the hub, and not the node whose correlator may be the one that lags: it stores a problem event when the condition starts and a resolution event when it has ended; a new holder checks again from the current state.
  • Conditions of the installation are raised in its operator hub (installation.operator_hub, architecture.md §12), not in the hubs they affect: unowned locks, a failing slice, an OIDC issuer that doesn't answer and the conditions of a node (below). A managed installation whose provisioning named no operator hub yet only logs them.
  • The provisioning of a managed installation (operations.md §4): the node that runs the client of the installation channel stores a problem event while every call on the channel has failed for 5 minutes (self/installation-channel/-, major, with its cause) and while a hub's provisioning or deletion has failed 5 times in a row (self/provisioning-failing/<hub id>, with its cause), each at most every 5 min, with expires of 15 min and of 2 h.
  • An OIDC issuer that doesn't answer (its discovery or token endpoint fails in transport while someone signs in): the sign-in answers 503, and the node raises an occurrence self/oidc-unreachable/<node> with the cause, as the installation's one OIDC client serves every hub's sign-in (architecture.md §11).
  • Unowned locks. Every node checks the locks of the partitions, the correlator shards and the link shards (architecture.md §4) and stores a problem event every 30 s while one stays unowned for more than 15 s, with expires of 2 min (self/partition-unowned/<partition>, self/correlator-unowned/<shard>, self/link-unowned/<shard>). The alert of an unowned partition whose own key falls into that partition waits with it; the pipeline lag in the hub heartbeat lets Watch page meanwhile (architecture.md §9).
  • A failing slice. A hub's slice of a step that fails is rolled back alone and its rows wait (architecture.md §4 One transaction per step); its own cause, such as a revision that doesn't load, is raised in the hub as well. While every step of an owner that has a slice of the hub fails it for 60 s, the owner's node stores a problem event every 30 s with expires of 2 min, self/slice-failing/<hub id>, whose detail names the owner (a partition or correlator shard) and the last error: the hub's events wait and its timers don't fire until a step succeeds.
  • Conditions of a node (disk usage, SNMP spool use, its TLS certificate) carry the node's name in the key (self/<kind>/<node>; self/spool-in-use/<node> while traps or UDP syslog messages wait in the spool because the database doesn't take them; self/certificate-expiry/<node> while the listeners' certificate expires within 30 days, has expired or doesn't parse; self/disk-space/<node> while the filesystem of [snmp] spool_dir has less available than the spool may still write, spool_bytes less its file, or less than a tenth of its size). The node checks its certificate and its disk every minute. A mailbox that its reader can't read carries the Source's name instead (self/mailbox-unreadable/<source>, integrations.md §13). The node stores a problem event every 5 min while the condition holds, with expires of 15 min, and a resolution event when it ends, or at its first check after it starts when an alert of the node's name for its spool, certificate or disk is open and the condition doesn't hold. The alert of a node that stops expires.
  • Occurrences (a Source over pipeline.sourceRate or closeKeyLimit, an event stored as limited, rejected senders, stale spooled events, traps or UDP syslog messages lost to a full spool (self/spool-full/<node>), a rule at pipeline.maxInstances, an action failing, a page refused with 422, a one-off downtime started or ended) store a problem event each time, with expires of 1 h: nodes that see the same occurrence give duplicates of one alert, which closes an hour after the last. A node stores its conditions about once a second; repeats of one condition within that second are one event.
  • Daily quota. When a hub's events of a UTC day reach 80 % and then 100 % of its events_per_day (§2), the node whose count shows it first stores an event of self/daily-quota/80-<day> (warning) and self/daily-quota/100-<day> (major), each once per hub and day (hub_usage.quota_notice), with expires of 24 h. They are routed by the built-in rule builtin:quota before the ActionRules: an immediate notify run to the addresses of fallback.selfAlerts, when set; the ActionRules then run as for any alert, except that their page actions start no run (suppressed by quota): a notice of usage pages nobody. The hub's usage page shows the day's events against the limit (ui.md §2). Refusals above the rate and above three times the quota are occurrences: self/hub-rate/-, self/daily-quota-refused/-.
  • The self-alerts about the link (link down, the cloud refusing the hub's version, fallback active, the fallback account failing a bind: checks link-down, hub-update-required, fallback-active, fallback-account) are routed by the built-in rule builtin:link before the ActionRules, like the synthetic test (§10), outside downtimes, storms and shadow mode. Its open starts an SMS through the local fallback channel to the cache of the rotation of fallback.selfAlerts, when the channel is configured: a run of type fallback (identity fallback:<team>/<rotation>) that the channel sends while the fallback is active, since the hub binds to the SMSC only then, and that ends when the alert closes; nothing of it goes up the link (schema/hub.sql fallback_send). And it starts an immediate notify run to the addresses of fallback.selfAlerts, when set (architecture.md §7). The ActionRules then run as for any alert, except that their page actions start no run: they are recorded as suppressed by link, since the cloud they would go through is what the alert reports. With neither a fallback rotation nor an address the alert is listed only, and L1 warns (spec-format.md §5).

20. Rules that change or leave the spec​

State that a rule built up outlives the revision that defined the rule. When the correlator passes the activated_at of a revision, and a partition for the holds of the alerts it routes:

  • Heartbeat. The instances of a Heartbeat that is gone, or whose groupBy changed, are removed and their open alerts close (close reason rule-removed); a changed Heartbeat starts like a new one (§5). Instances newly listed in expect start in unknown; those no longer listed stay like instances that began with a beat. A new interval or grace applies from the instance's next beat or timer.
  • ExpectRule. The expectations of a rule that is gone, or whose correlate changed, are removed and their expect alerts close (rule-removed). A new within applies to expectations opened after.
  • StormRule. The storms of a rule that is gone, or whose scope changed, end as when their rate falls (§7): the storm alert closes (rule-removed) and the linked alerts are released.
  • CorrelationPattern. A group keeps the pattern of the revision in force at its first member (window, groupBy, causes, roles, members) until it closes, also when the pattern is gone; new groups form under the new revision.
  • ActionRule. Held runs are cancelled at their hold trigger when their rule no longer matches or is gone (§9). Running runs continue (§10).
  • TicketProfile, Webhook, write-back. A run's follow-ups use the object of the revision in force. When it is gone, the run ends without a further follow-up; its ticket is released (§10) and annotated in the ITSM where the adapter still can.
  • Source. Its events are rejected (§3) and its intake tokens revoked (architecture.md §11). Its open alerts stay until a person, a bulk close or an AutoClose closes them.
  • AutoClose. The rules of the revision in force apply to every open alert from its activation on, with the alert's first_seen and last_seen as they are, so a new rule closes the alerts already older than its after at once.
  • DowntimeSchedule. §8.