Alert Configuration
The Alert Configuration page (/alerts/config) is where you tune what counts as a problem. CritterWatch ships sensible defaults, but every system has its own definition of "slow" and "behind" — this page is the single point where you change them.

The page has four top-level tabs:
Metrics · Projections · Listeners · HistoryThe first three configure what raises alerts (and what auto-remediates); the last records what changed and when. The preset-profile dropdown in the toolbar applies the Production / Development profiles described under Preset profiles: choosing one fills in the metrics and projection global defaults on the page, and nothing is stored until you save them. The dropdown keeps showing the profile you last chose. It does not switch back to Custom when you edit a field, and choosing Custom changes nothing.
What the license unlocks
The preset dropdown, Preview and the three global-defaults forms (Metrics, Projections, Listeners) need a license with alerts enabled. The per-service, per-message-type and per-shard forms need the custom-thresholds feature. Without them the controls are disabled, with a tooltip naming what is missing, and the server refuses the same saves. Settings › License Info lists what the running license includes.
Live Preview
Clicking Preview in the toolbar checks the thresholds currently on the page against the console's latest per-message-type metrics and lists what would be over them. It runs in the browser, only when you click; it does not follow your edits, so click again after a change. Nothing is saved.
| Preview column | Meaning |
|---|---|
| Service | Which service is over the limit |
| Message Type | The message type at fault |
| Metric | Execution Time or Failure Rate |
| Current | What the live metric reads |
| Threshold | The threshold it crossed |
| Severity | warning / critical |
⚠️ It approximates the evaluator rather than replaying it. It covers execution time and failure rate only (no throughput, projection, shard or listener thresholds). It compares the average execution time in raw milliseconds against the Warning / Critical percent values rather than against a baseline. It applies the per-service and per-message-type values loaded for the service selected on the Metrics tab to every service, and it applies per-message-type thresholds on every metrics source, while the evaluator applies them only on some (see below). Treat it as a rough check, not a forecast of what will fire.
Metrics Tab
Metrics-side alerts fire on three dimensions: execution-time degradation, throughput anomalies, and failure rate. Each dimension has a global default plus optional per-service overrides. Execution time and failure rate also take per-message-type thresholds.
Global Defaults
| Section | Threshold |
|---|---|
| Execution Time Degradation | Warning % over baseline · Critical % over baseline |
| Throughput Anomaly | Warning multiplier over baseline · Critical multiplier over baseline |
| Failure Rate | Warning % · Critical % · Window minutes |
The execution-time and throughput thresholds are relative — they fire when current metrics exceed a baseline by N percent / N times. The baseline is resolved through a cascade, in this order:
- Observed history, if it is mature enough. CritterWatch prefers what the service has actually been doing. "Mature" means at least
BaselineMinimumSamplessamples (default 100) and at leastBaselineMinimumDaysdays of history (default 10), aboveBaselineMinimumThroughputPerHour(default 1.0). All three are tunable per service. - A declared baseline, if history is not yet mature. Declare these with the
configureBaselinescallback onAddCritterWatchMonitoringin the monitored service. - No alert at all, if neither is available. A dimension with no baseline simply doesn't fire.
Observed history winning over a declaration is deliberate: a baseline someone typed a year ago is worse evidence than what the service did last week.
The failure-rate threshold is absolute — it fires when the failure percentage in the rolling window exceeds the configured percentage. The window controls how long an outage has to last before it crosses the threshold; small values are noisy, large values lag.
Per-Service Overrides
Pick a service from the dropdown to configure overrides just for that service. Each form field shows an "Inherited (X)" tag when it falls back to the default and an "Overridden" tag when an override is set. Empty / null fields inherit; non-empty fields override.
The form's Data Source field is not saved
Under a Metrics Data Source divider, the per-service form shows a Data Source dropdown (PostgreSQL, Prometheus, VictoriaMetrics) and, for the last two, an endpoint URL. The console does not store either value, so changing them here changes nothing. Which source serves a service is its binding on Settings › Metrics Data Sources, and the sources themselves are declared at host startup.
Per-tenant alerts on Prometheus, VictoriaMetrics and Application Insights evaluate each tenant against its own measurements (on Prometheus and VictoriaMetrics, the tenant_id label), and they cost the same at one tenant or thousands. Each read is asked once per service, grouped by tenant (a sum by (tenant_id) query on the two PromQL stores), and every tenant reads its value from that answer, which is reused for PerTenantBatchLifetime (20 seconds by default, under the evaluator's 30-second cadence). Before this, each tenant was its own set of queries: about 16 per tenant per pass, or some 35,000 every 30 seconds on a fleet of 2,173 tenants. The service-wide reads are unchanged.
Per-Message-Type Thresholds
Once a service is selected, a Per-Message-Type Thresholds card appears at the bottom of the Metrics tab. Enter a message type's full name and click Add, then set any of four columns: Exec Warn %, Exec Crit %, Fail Warn % and Fail Crit %. An empty cell shows the value it would inherit as a placeholder. Save Message Type Thresholds stores them on the service's override.
Each message type with thresholds of its own gets its own execution-time and failure-rate alerts, evaluated against that type's numbers and baseline, beside the service-wide ones. The alert's subject is the message type. Clearing a type's thresholds resolves its alerts. Per-message-type alerts are store-wide, not per tenant.
Which metrics sources apply them
Per-message-type thresholds are applied on the console's own metrics (the default) and Application Insights. Prometheus, VictoriaMetrics and Datadog cannot narrow a query to one message type, so on those sources the thresholds are not evaluated, and the console logs that once. They were saved but applied nowhere before 1.2.
Projections Tab
Projection alerts fire on two dimensions: how far behind the high-water-mark a projection is, and how long since it last advanced (stale detection). A third toggle controls auto-restart on stale.
Global Defaults
| Section | Threshold |
|---|---|
| Behind High Water Mark (events) | Warning · Critical |
| Stale Detection (seconds) | Warning · Critical |
| Auto-Restart | On / Off |
"Behind" is the difference between the projection's current sequence and the event store's current high-water mark. "Stale" is the wall-clock interval since the projection last advanced.
Auto-restart, when enabled, sends RestartProjection to the affected service when a projection trips the Critical stale threshold. It will only restart once per stale episode — repeated stalls require operator attention.
Per-Service Overrides
Same pattern as the Metrics tab — pick a service, set overrides, see Inherited / Overridden tags.
Per-Shard Overrides
The most granular knob. Enter ServiceName:ShardName (e.g. OrderService:OrderProjection:All) to override thresholds and auto-restart for one shard.
Per-shard configuration also has a suppress switch that silences alerts entirely for that shard — useful for the rebuild scenario where a shard is intentionally far behind for the duration of a rewind, or for a known-broken shard that's being investigated.
Suppressing resolves the standing alerts too
Suppressing a projection resolves its existing alerts with "Alerts are suppressed for this projection" rather than freezing them active. Before 1.1 the resolve path sat inside the branch suppression skipped, so pressing suppress silenced every future alert and permanently froze the present ones — a suppressed projection that later caught up completely still read critical, describing a condition that no longer existed.
Per-tenant alerting
On a tenant-partitioned store a single projection is a per-tenant signal repeated thousands of times, so per-tenant alerting is governed by a ceiling rather than by thresholds.
The ceiling. PerTenantAlertCeiling (default 25) is the most individual per-tenant alert streams a projection may have. Above it, every per-tenant signal collapses into one roll-up alert per projection. The cap is not tuning for its own sake: at a real deployment's 2,173 tenants, un-capping would mean roughly 13,000 alert documents per evaluation cycle. A non-positive value means unlimited, matching PerTenantSampleCeiling beside it in the settings payload.
A roll-up carries its tenants as data. The roll-up's AlertMembership lists every affected tenant with Affected and InScope counts, so a complete answer stays distinguishable from a truncated one, and each member's FirstSeenAt is that tenant's own "since", carried forward across cycles. The message text keeps its five-name summary — the two are for different readers, and growing the prose to 1,299 names is not the fix. Before this, tenant identities survived only as five ids inside a sentence, so a large deployment could not route a per-tenant notification at all.
A watch list keeps named tenants individual. WatchedTenants on the per-service projection overrides names tenants that keep their own alert stream above the ceiling — "the dozen largest organisations", whose lag is a different kind of problem. A watch list spends from the ceiling's own budget rather than adding a second number, so there is one knob to reason about instead of two that can disagree. Overflow is reported on the roll-up, never silently honoured in part. The same list also keeps those tenants' metric rows above PerTenantSampleCeiling, so per-tenant metrics alerts cover them too.
Suppression is the smaller lever. SuppressedTenants on the per-shard overrides silences one tenant of one projection — the lever to reach for when a single customer is mid-migration, instead of suppressing the projection and going blind to all 2,173 tenants at once.
None of the three (PerTenantAlertCeiling, WatchedTenants, SuppressedTenants) has a field on this page. Set them through the alert-configuration API (/api/critterwatch/alerts/config/...).
Two rules worth knowing before you use both lists
Suppression beats watching. The lists are written at different grains — watch per service, suppression per projection — so a tenant landing in both is a matter of time rather than a mistake. "Be quiet about this one" is the more specific instruction.
A suppressed tenant leaves every roll-up, and the denominator with it. Not just the lag roll-up — hearing about a silenced tenant through the unmeasurable-or-unassigned summary would be a change of alert type, not suppression. It leaves the count too, because those roll-ups escalate to Critical when every eligible tenant is affected, and a silenced tenant left in the denominator would soften that verdict on the strength of a tenant nobody is watching. (A watched tenant leaves only the lag roll-up — that is the only one it has its own copy of.)
Listeners Tab
One concern: stuck-listener remediation. When a listener trips the stuck-listener alert (StaleListener) — it reads Accepting but its transport channel is Disconnected, its receive loop is Stopped or Faulted, or messages are waiting and it has had no activity for 2 minutes — CritterWatch can automatically send a Restart to try to recover it. The restart is rate-limited per endpoint (at most once every 10 minutes) so a genuinely-broken listener isn't hammered. Off by default; the Auto-restart stuck listeners toggle + Save Defaults turn it on. See Endpoints for how the underlying health pills surface.
History Tab
A read-only record of threshold changes. Every successful save on this page writes one row for each field whose value it changed; a save that changes nothing writes nothing.
| Column | Meaning |
|---|---|
| Time | When the change was saved |
| Config Area | Which form was saved: Metrics defaults, Metrics: OrderService, Message types: OrderService, Projection defaults, Projections: OrderService, Projection shard: OrderService:OrderProjection:All or Transport defaults |
| Field | The stored field name, e.g. failureRateCriticalPercent |
| Previous | Old value (red); (none) when the field had never been set |
| New | New value (green) |
Use this to answer "when was the failure-rate Critical threshold lowered?" and "did the projection-stale defaults change since the last quiet weekend?" The tab shows the 200 most recent changes. The Refresh button re-fetches; the table is not auto-refreshed because edits are infrequent.
It records what changed and when, not who: a row carries no user. Only saves made on this page are recorded. A change made directly through the alert-configuration API, or a baseline a service declares, does not appear here.
History is independent from the system-wide Audit Log — it tracks configuration changes specifically, not operator actions on services.
Hysteresis and Alert Lifecycle
CritterWatch alerts are event-sourced: they go through Raised → Elevated → Reduced → Resolved → Cleared. The Critical / Warning thresholds drive Raise and Elevate transitions; Resolved fires when the metric drops back below Warning; Cleared is operator-initiated.
Hysteresis prevents flapping at the boundary. For the metrics alerts it is counted in evaluator passes: a breach must be seen in HysteresisRaisePasses consecutive passes (default 2) before an alert is raised or its severity changes, and a clean reading in HysteresisResolvePasses consecutive passes (default 2) before it resolves — about a minute either way at the 30-second cadence. Both are settings on the metrics defaults and the per-service overrides and per message type, but this page has no field for them; set them through the alert-configuration API. See How metrics-based alerts are determined.
Tips
- Preview, then save once. Every save writes History rows, so saving each tweak fills the tab with low-signal entries. Remember Preview is approximate.
- Per-service overrides win over global defaults. Per-shard wins over per-service, and per-message-type wins over per-service for that type's own alerts. There's no per-tenant threshold layer: the per-tenant lists only watch or suppress tenants.
- A blank field is "inherit," not "zero." Setting a threshold to 0 means zero is the trigger. To remove an override entirely, clear the field — the inherited-tag should reappear.
- Use baselines, not absolute numbers. Absolute thresholds drift as load patterns change; baseline-relative thresholds adapt.
