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
eventrow per contained alert (an Alertmanager group of 12 alerts gives 12 events) with the raw payload, before responding. - A payload over
pipeline.maxEventBytesis rejected with413. - 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 answer429(intake.source_rate) withRetry-After, SMTP452, 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 ofNnodes takes up toNtimes 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'spipeline.sourceRateapplies within the hub's. Refused, HTTP channels answer429(intake.hub_rate) withRetry-Afteruntil the bucket holds the events, SMTP452, 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 occurrenceself/hub-rate/-(§19). - Daily quota. A hub with
events_per_dayis 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, with429(intake.daily_quota) and aRetry-Afterof the time to midnight UTC, and raisesself/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.sqlhub_usage). The installation's provisioning sends them to the cloud (api/cloud.yamlreportUsage), the hub's API shows them (api/hub.yamlgetUsage). A hub withoutevents_per_secondandevents_per_dayis metered and refused nothing for them. - Connections. Each sender address may hold at most
pipeline.maxConnectionsTCP and TLS connections to the intake, SMTP and syslog listeners of a node; more are closed at once and counted. A syslog message overpipeline.maxSyslogBytesis 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
503withRetry-Afterat 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
allowFromtakes events only from those addresses: an HTTP request from elsewhere gets403(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 thatallowFromjudged and, when it came through a relay (architecture.md §13), that relay (schema/hub.sqlevent). received_atis 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 asoccurred_atand 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 thanpipeline.maxSpoolAgeis stored with outcomestale, 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
errorwith 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), ordowntime-startanddowntime-end(a sender announces its own maintenance, §8). Each channel has a default role rule (integrations.md §1). - Severities outside the six values become
unknownand are counted per Source. nodeis lower-cased; configured domain suffixes (Settingspipeline) are stripped so that it matches CI aliases.- A missing
keyis an error (outcomemapping-error); the event is stored and opens no alert. A missingseverityisunknown, a missingtitleis 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 outcomerejected; 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 atreceived_at.
4. Enrich
- The CI is looked up in the active inventory snapshot
(§15): by
ciif set (a CI ID or name), else bynodeagainst 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'sprecedencewins, then the smallest CI ID; the ambiguity is a data-quality issue (§15). Its attributes areinv.ci.*. - The alert's service. If the mapping set a service hint (
service), the service whose name,itsm_refor 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, areinv.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", noinv.ci.*attributes; a hinted service is still attached. A hint that matches no service leavesservice_hintset and noinv.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 readinv.*. - 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 + graceopens an alert of kindheartbeatwith keyheartbeat/<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
excubiowith the channel and the node's name asnode. A Heartbeat withchannel = "…"watches it with one instance per node, the hub's nodes expected (schema/hub.sqlhub_node), so a dead listener on one node shows while the others still beat. A node that leaves the hub (excubio-hub leave, orexcubioctl node removefor one that is gone, cli.md §6) is no longer expected: its instances are forgotten as below. - A new Heartbeat starts in state
unknownand opens no alert until its first beat has arrived or oneinterval + gracehas passed. - A Heartbeat with
groupBykeeps one state per instance (the values of itsgroupByattributes); the alert key isheartbeat/<name>/<values>. Instances listed inexpectstart inunknownlike a new Heartbeat; others start with their first beat. A beat without allgroupByattributes is consumed and counted, and updates no instance. - A person who closes a
heartbeatalert closes only the alert: a heartbeat still missing opens a new one after anotherinterval + grace.heartbeat forget(commandforget) removes the instance and closes its alert (close reasonforgotten). - Instance limit. A Heartbeat, a StormRule (§7) and an
ExpectRule (§17) each keep at most
pipeline.maxInstancesinstances (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:
-
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 (theexcubio-msgmessage ID, the ID of an event submitted over OBM REST, forobm-upstreamthe OBM event ID with its change time), compared with the events received withinpipeline.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 withinpipeline.copyWindow. This removes resent messages and the copies of devices that send to two hub nodes. -
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 reasonclose-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 ~ '^…$', withlower()on both sides undercloseKeyIgnoreCase); - 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%'(indexalert_open_key_prefix) and requires the pattern's literal runs (LIKE '%run%'); withcloseKeyIgnoreCaseit uses only ASCII literals, aslower(key) LIKE 'prefix%'(indexalert_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.closeKeyLimitalerts 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'soccurred_at, which the late-problem guard reads (step 5.2). - a glob pattern as one anchored regular expression (
-
Role
info. Stored and counted (outcomeinfo); no alert. -
Role
resolution. Closes the open or acknowledged alert with the same key (outcomecleared). Without one, the event is stored asclear-unmatched. Either way, the resolution is remembered forpipeline.latePeriod. -
Role
problem:- Duplicate. An open or acknowledged alert with the same key is
updated:
countandlast_seenalways; severity, title, description and labels as the Source'sduplicatespolicy says. A severity change is an alert change (triggerchange); a plain duplicate is not. An acknowledged alert stays acknowledged. - Late. If a resolution of the key is remembered and the problem's
occurred_atis not later than the resolution'soccurred_atpluspipeline.clockSkew, the problem arrived after its own resolution: it is stored aslateand neither opens nor reopens an alert. Without both times, the problem is processed normally. - Reopen. If the key's alert closed less than
pipeline.reopenWindowago, that alert reopens: triggeropen,reopensincremented, its history kept. - New. Otherwise a new alert opens (trigger
open), unless the Source is atpipeline.maxOpenPerSource: then the event is stored with outcomelimited, 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'ssource, 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.
- Duplicate. An open or acknowledged alert with the same key is
updated:
- Expiry. An alert whose mapping set
expirescloses with reasonexpiredwhen 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-closeandbulk-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-closedandmerged(a group alert, §16),forgotten(a heartbeat instance, §5) andrule-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
scopeattributes) in a sliding window. - When a scope exceeds
thresholdnew alerts inwindow, a storm alert opens: kindstorm, keystorm/<rule>/<scope values>, severitymajor, with the count in its description, and inherits the scope attributes (node,check,ci,service_hintandl.*; 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 = stormand 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 theirpage,ticket,writebackandwebhookactions 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
releaseandafter_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.sqlstorm_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).
- 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
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 origininventorywhile 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 andcis, 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_fromoreffective_tounder the activation lock, by the rule ofactivated_at, and records it inactivation_log(schema/hub.sqldowntime). A downtime is in force for the events, commands and timers aftereffective_fromand not aftereffective_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 itsdowntime-startanddowntime-endtimers 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-starttimer, for the next occurrence; when it fires, the correlator writes the occurrence as a downtime of originschedule, 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 origininventorywhen the snapshot activates, with timers for their starts and ends. - Alerts that open or change while a matching downtime is in force get
suppression = downtimeand record that downtime (the one ending last, if several match). Routing records their decisions;page,ticket,writebackandwebhookdon't run;notifyruns only if the downtime'snotifyis 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-startstarts a downtime whose selector is the event'snodeand service hint, where set, plus the labels the Source lists indowntimeScope(for exampleapplicationandobject) with the event's values; a listed label the event lacks selects the alerts without it. An event withoutnodeand service hint is a mapping error. Adowntime-startwhile that downtime is in force changes nothing. Adowntime-endevent with the same selector ends it; without one, it ends after the Source'sdowntimeMax(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 adowntime-startwithin the correlator's lag aren't suppressed yet. The downtime selects only alerts of the Source's namespace unless the Source setsdowntimeAcrossSources = true, which, as every change tosources/, needs anadminapproval. Event outcomedowntime; downtime originsource. - Downtimes don't change closes: a clear during a downtime closes the alert.
- One-off downtimes need
operatorin 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 thanpipeline.maxDowntime(from its start or from its creation, whichever is later), or matching more thanpipeline.wideDowntimealerts by either count, needsadmin, and so does ending it early. Starts and ends of one-off downtimes that neededadminor were created by a person raise a self-alert of severitywarning, 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):
- Facts.
team,service,oncallandnotifyare evaluated in this order by the Classify rules (spec-format.md §3.8). Each fact can use the ones before it. - Actions. ActionRules whose
oncontains the trigger run by ascendingorder; each matching rule adds its actions, until astoprule or adropaction matches. - 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.
- One decision per alert change. When the decision of a
release,calendar,holdorgrouptrigger, or of achangeafter a newer snapshot, changes a fact, the decision carries both its own trigger andchange; each rule runs once if itsoncontains either.openandclosenever addchange. - The trigger
grouproutes an alert again when it joins, moves to or leaves an alert group after it was routed (§16). - Suppression. The downtime and the storm that suppress an alert are
stored apart, both by its partition
(architecture.md §4). The
alert's
suppressionis the first that applies,downtimebeforestorm. When one ends, the other takes its place if it still applies; only when none is left is the alert routed with triggerrelease.
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
holdruns on its ownholdtrigger whatever itsonsays. - At the
holdtrigger, each held run whose own condition is met (itsforhas ended, or itscountis reached withinwithin) 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
holdstarts it at once. A rule withholdandstop = truestops 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
changefor a rule onopenonly) keeps it. The timer is then set at the earliest end offorof 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.
| Action | Behaviour over the alert's lifecycle |
|---|---|
page | open: 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. |
ticket | open: 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. |
writeback | Sends alert state changes (acknowledged by whom, paged, ticket ID, closed) to the alert's source (integrations.md §6). |
notify | immediate: 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. |
webhook | The 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). |
attach | A 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. |
drop | Nothing runs; the alert is marked dropped with the reason. |
- Action runs. An action's identity within its alert is its type and
target:
pagethe team and rotation,attachthe group,ticketthe TicketProfile,notifythe recipients and mode,webhookthe Webhook,writebackthe 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 withouthold, 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
minortocritical). So on acalendartrigger, an alert that was e-mailed during office hours pages at their end without a second e-mail, and aholdtrigger 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
reopensto 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
selfwith checkexcubio-synthetic, keysynthetic/<test ID>, the test code in its title, the test ID as labeltest_idandexpiresof 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 rotationsyntheticof the reserved teamexcubiowith the test ID as grouping key, and nothing else runs. A page to that rotation that the cloud refuses isn't re-routed torouting.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.sqlmanual_page). Each is a run of its own: its page request is an up message with the idempotency keymanual/<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). A422from the cloud fails it and raises a self-alert; it isn't re-routed. Analert_idshows it in the alert's view and changes nothing about the alert. Its state and its incident are read withgetManualPage(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'skeyField, integrations.md §5) or the event'sid. 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 modeimmediatesends its e-mails; withdigestit 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 kindwebhook-digest,schema/hub.sqltimer); 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 aholdan 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
sincetime is older thanafter. The close reason isauto-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
operatorin scope. The hub first returns the count; the close then runs as one operation, limited bypipeline.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.sqloperation); 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'sreplay_window_days, architecture.md §12 Limits; a longer range asked for is refused with403hub.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
routingorinventory, 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 readsinv.ci.teamorinv.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.sqlrouting_decision.trace) is routed under both, itsinv.ci.teamandinv.service.teammapped 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.sqlalert_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, whosecalendarandholdtriggers 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
inventorytake 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 anadminapproval (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.replayMaxEventsevents (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 astruncated. 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'sintervalplusgrace, a StormRule's or CorrelationPattern'swindow, an ExpectRule'swithin, of either revision, at most 7 days), at mostrouting.replayMaxEventsof them. A group is named in the comparison by its pattern,groupByvalues 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-sensitivethe 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 thatcorrelation.maxGroupSizelimited. 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 asmanualtoo. - What replay doesn't show. The InventoryModel, the InventorySources
and Settings
inventoryact 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.sqlreplay_diff) with the decisions of both revisions, their classes and flags, and listed withlistReplayDiffs(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 (Classifynotify-default),oncall= true (Classifyoncall-from-service:inv.service.hours= 24x7),rank= 4, greater than 2.team= perimeter from Classifyteam-from-inventory(inv.service.team, via TeamMapgroups: "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
stopordropis 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
causesselector 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/explainexplains 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):
| Sequence | Expected |
|---|---|
| problem, duplicate, duplicate with higher severity, resolution | one alert, one change, closed clear |
resolution, then the problem with an earlier occurred_at | no alert; problem late |
resolution, then the problem with a later occurred_at | the problem opens an alert |
an excubio-msg message, then the same message resent from its spool with the same message ID | one alert, count = 1; the resend is a copy |
problem, resolution, the problem again after reopenWindow | two 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 nodes | one event processed, one copy |
| problem during a downtime, downtime ends, resolution | suppressed decision, release, close |
| 60 problems on one node in a minute, then quiet | one storm alert, linked alerts, release at the end |
heartbeat beats, pipeline paused past interval + grace, beats resume | no missing-heartbeat alert |
| problem in Source A, resolution with the same key in Source B | A's alert stays open |
problem with closeKey matching a warning's key | warning closed close-key, problem open |
| problem at 16:50 routed by a 07:00–17:00 Calendar, still open at 17:00 | calendar trigger at 17:00, one new decision |
problem under a rule with hold.for = 5m, resolution after 3 min | held decision, closed clear, no page |
problem under a rule with hold.for = 5m, still open after 5 min | hold trigger at 5 min, one page |
problem under hold.count = 3, within = 10m, duplicates at 4 and 8 min | hold trigger at 8 min, one page |
problem under hold.count = 3, within = 10m, duplicates at 4 and 15 min | no page; occurrences never reach 3 within 10 min |
| watchdog beats of two clusters, one stops | one 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 causes | one 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 wait | the same group, cause and page |
two alerts with the same l.cluster 40 min apart under a pattern with window = 30m | two groups |
a start event of an ExpectRule, no follow-up within within, then the follow-up | an 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 ascheduleago), 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 thaninventory.maxCisor the hub'scislimit, 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 thecislimit 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 staterejectedwith 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):- Identity. Records of different sources are one CI when they share
an identity key of a kind listed in the model's
merge(defaultfqdn,serial,vm-uuidandref, a source's explicit reference to another source's ID). The kindsipandhost(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'splaceholders(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. - Attributes. Each attribute comes from the first source of its precedence list that has it (spec-format.md §3.18).
- 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 isother. - 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. - 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 inprecedence; when a CI splits, the part with the record first inprecedencekeeps the ID and the others get new IDs as new CIs do. Which records make up each CI is kept outside the snapshot versions.
- Identity. Records of different sources are one CI when they share
an identity key of a kind listed in the model's
- Maintenance windows of the snapshot become downtimes of origin
inventorywhen 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 settingsinventory.minCisandinventory.maxChangeguard 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 thenexpired. 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, androuting.unroutedTeamthose 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 Settingsnotify, 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.sqlalert_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.*andgroup.*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:- The alert joins the open group of the pattern that accepts it: the
alert's first problem is within the pattern's
windowof the group's first member, and it has the group's values of the pattern'sgroupByattributes. - Otherwise it opens a new group.
An alert that lacks a
groupByattribute 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 thewindowis then the problem that reopened it.
- The alert joins the open group of the pattern that accepts it: the
alert's first problem is within the pattern's
- Group alert. A group is an alert of kind
group, namespaceexcubio, keygroup/<pattern>/<id>. Its severity is the highest of its open members; its title, node, CI, service, labels andinv.*attributes are those of its probable cause, and its title carries the count ("esx-04 down (+11 related)"). Thegroup.*attributes (spec-format.md §2) describe the group. Classify and ActionRules route it like any alert, with the triggersopen(when thewaitends),change(severity, cause or a fact changed) andclose. Its page goes through the rotation's grouping and storm guard like any page (on-call.md §3). Group alerts andexpectalerts 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:
- the open members that match the first of the pattern's
causesselectors that any open member matches; without such a selector, all open members; - 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 rolemember. When the cause changes after the group alert was routed, the group alert is routed with triggerchange; a page already sent stays with its rotation, whose incident shows the new cause, and the new cause's team becomes involved (below).
- the open members that match the first of the pattern's
- Members. Each member is routed with its own facts: a new or
reopened alert with trigger
openonce it has joined, an alert that joins, moves or leaves later (a merge, a manual change) with triggergroup. The pattern'smembersdecides what its actions do:attach(default): a member'spageactions becomeattach(§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 nopage, 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 withgroupBy = ["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.teamscounts them. Apageof the group alert carries them, and the cloud informs their rotations (on-call.md §3), or pages them when the action saysinvolve = "page". - End. A group accepts no members once the pattern's
windowfrom its first member has passed. The group alert closes when all its members are closed (close reasonmembers-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 triggergroup. - Manual changes. A
responderin 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; anoperatorcan 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 reasonmerged, 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
rolesname sub-selectors; the group attributegroup.has.<role>is"true"while an open member matches one. Withmembers = "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.maxGroupSizemembers (spec-format.md §3.16), also after a merge; further alerts that would join are counted on the group and routed by themselves. At mostcorrelation.maxOpenGroupsgroups accept members (forming, or open within theirwindow); beyond that, alerts that would open a group are routed ungrouped and a self-alert fires. Groups past theirwindowthat 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
startorthenselector, whatever their outcome; observing doesn't consume them. - A start event opens an expectation for the values of the rule's
correlateattributes, due afterwithin. A further start event of the same values restarts it; an openexpectalert of those values stays open until a follow-up clears it. - A
thenevent of the same values before the due time ends the expectation. At the due time without one, an alert of kindexpectopens with keyexpect/<rule>/<values>and the rule's severity, title and labels; a laterthenevent 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), channelself, with the active revision asmapped_revisionand the fields built in: namespaceexcubio, keyself/<kind>/<subject>(for exampleself/source-rate/<source>,self/partition-unowned/<partition>), the condition's severity (warningunless architecture.md §9 names another), andcheck=<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 kindself; 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 forfallback.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, withexpiresof 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 occurrenceself/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
expiresof 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
expiresof 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_dirhas less available than the spool may still write,spool_bytesless 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, withexpiresof 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.sourceRateorcloseKeyLimit, an event stored aslimited, rejected senders, stale spooled events, traps or UDP syslog messages lost to a full spool (self/spool-full/<node>), a rule atpipeline.maxInstances, an action failing, a page refused with422, a one-off downtime started or ended) store a problem event each time, withexpiresof 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 ofself/daily-quota/80-<day>(warning) andself/daily-quota/100-<day>(major), each once per hub and day (hub_usage.quota_notice), withexpiresof 24 h. They are routed by the built-in rulebuiltin:quotabefore the ActionRules: an immediatenotifyrun to the addresses offallback.selfAlerts, when set; the ActionRules then run as for any alert, except that theirpageactions start no run (suppressed byquota): 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 rulebuiltin:linkbefore 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 offallback.selfAlerts, when the channel is configured: a run of typefallback(identityfallback:<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.sqlfallback_send). And it starts an immediatenotifyrun to the addresses offallback.selfAlerts, when set (architecture.md §7). The ActionRules then run as for any alert, except that theirpageactions start no run: they are recorded as suppressed bylink, 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
groupBychanged, are removed and their open alerts close (close reasonrule-removed); a changed Heartbeat starts like a new one (§5). Instances newly listed inexpectstart inunknown; those no longer listed stay like instances that began with a beat. A newintervalorgraceapplies from the instance's next beat or timer. - ExpectRule. The expectations of a rule that is gone, or whose
correlatechanged, are removed and theirexpectalerts close (rule-removed). A newwithinapplies to expectations opened after. - StormRule. The storms of a rule that is gone, or whose
scopechanged, 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
holdtrigger 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_seenandlast_seenas they are, so a new rule closes the alerts already older than itsafterat once. - DowntimeSchedule. §8.