Skip to content

Audit Log ​

The Audit Log (/audit-log) is the system-wide record of every operator action that mutated state in a monitored service. Pause a projection, replay a DLQ batch, hard-delete a tenant — it lands here, signed with the operator's identity and the parameters of the action.

This is the page you open when production is acting weird and you need to know who did what, when.

Reading the audit log needs a CritterWatch license: without one the page shows a banner and its controls are disabled, and the endpoint refuses the read.

Filters ​

The filter row at the top of the page narrows the table to a subset of entries.

FilterEffect
All Actions dropdownRestrict to one action type (e.g. HardDeleteTenant). The dropdown offers a fixed list of common actions; any other action, such as CancelScheduledMessages, can be filtered with ?action= in the URL
All Channels dropdownRestrict to how actions arrived: Console, MCP, System or Unknown (see Channels)
Search boxNarrows the loaded rows to those whose details, target, action, service or SQL statement contain the text
Global service selector (header)Restrict to actions targeting one service

The Action filter re-fetches from the server. The Channel filter applies to the loaded rows, after a SQL statement's request and outcome rows are paired, because those two rows have different channels. The Action and Channel filters are kept in the URL (?action=, ?channel=), so a filtered view can be shared.

Table ​

ColumnMeaning
TimestampRelative time (e.g. 12m ago) — tooltip shows the absolute timestamp
ActionAction type, rendered as a colored badge (see badge-colour mapping below)
ServiceThe service the action targeted
TargetOptional target URI (endpoint URI, projection shard, tenant id, etc.)
DetailsFree-form description
Parameters"Show (N)" button if the action carried structured parameters; click to expand a key=value list below the table (with the MCP client, for an MCP row)
UserInitiated-by identity
ChannelHow the action arrived. An MCP row names its client on hover, and in the expanded detail

Dead-letter actions ​

Every replay, discard, edit-and-replay, archive and restore of dead letters is recorded as ReplayDlq, DiscardDlq, EditAndReplayDlq, ArchiveDlq or RestoreDlq, from the console and from MCP alike. There is one row per service the action was sent to, so a fleet-wide "Discard All Matching" shows every service it reached. The parameters record exactly which messages: the ids (or their count, past 50), or the query (message type, exception type, endpoint, exception message, time range, header filter), plus the databases named, the request id, fleetWide=true for a row that is one service's share of a fleet-wide action, and the operator's reason when one was given in the confirmation or passed to replay_dead_letters / discard_dead_letters. An edit-and-replay records the edited body's length, never the body, since a message can carry anything. A refused action writes no row: the log records what was sent, not what was attempted.

Two more rows come from the Dead Letters page's operations and failure groups:

  • CancelDlq — an operation was cancelled, one row per service the cancel was sent to, with the operation's requestId and type.
  • NoteDlqGroup — a failure group's note was written or cleared, with the group's failureGroup key and the note's text in the details. It names no service, because a group can span several.

The row records what was sent, not how it went. Whether each database replayed or discarded, how many dead letters it affected, and which failed are on the Dead Letters page's Operations tab.

Channels ​

Every row says how the action reached the console, beside who took it:

ChannelMeaning
ConsoleAn operator acted in the CritterWatch console: a command it sent, or its own HTTP API
MCPAn agent acted through a CritterWatch.Mcp tool. The row names the client, as the request identified itself (its User-Agent)
SystemThe console acted on its own behalf, with no person behind it, for example recording the outcome when a monitored service answers. Its user is always system
UnknownA row written before CritterWatch 1.1, or an action whose message proved neither a console connection nor an MCP call

The channel is decided in the same place as the user, so the two cannot disagree: a System row never names a person, and a person's action is never System. An agent's action is recognized by the relay ticket the MCP server attaches to its command. That is an in-process secret, so a monitored service writing to the console's queue cannot pass a command off as an agent's, and an MCP call reads as MCP even when RBAC is off and the caller has no name. Rows written before 1.1 are never guessed into a channel: they stay Unknown.

A SQL statement an agent ran is one row: its request is MCP and its recorded outcome is System, and the paired line takes the request's channel.

An irreversible MCP tool adds two rows of its own (see confirmation tokens): McpConfirmation.Issued when the agent was shown the preview, and McpConfirmation.Redeemed when the confirmed call ran. Both are channel MCP and carry the same confirmationId, so a preview that was never confirmed is visible as an Issued row with no Redeemed partner.

Action Categories ​

The Action badge's colour comes from a short, fixed mapping of action names to six categories. It is colour only; there is no category filter:

CategoryActions in this categoryBadge colour
dlqEvery action ending in Dlq (ReplayDlq, DiscardDlq, EditAndReplayDlq, ArchiveDlq, RestoreDlq, CancelDlq), and NoteDlqGroupOrange
listenerPauseListener, RestartListenerBlue
projectionRebuildProjection, RewindSubscriptionPurple
alertClearAlertGreen
tenantAddTenant, RemoveTenant, HardDeleteTenant, DisableTenant, EnableTenantTeal
configEvery other actionGrey

The mapping names only the actions in the table, so many audited actions are grey: the projection pause, restart and eject actions, the scheduled-message, recurring-schedule, node and agent actions, document reads and writes, and SQL statements. PauseListener and RestartListener are names no row carries today: pausing or restarting all of a service's listeners is recorded as PauseAllListeners / RestartAllListeners, and a single listener's pause, restart or drain is written to the Timeline rather than here. The mapping lives in src/FrontEnd/src/composables/useAuditLog.ts (actionCategory() and actionBadgeColor()).

SQL Query Entries ​

A SQL statement run from the Event Store Explorer's SQL view or the query_sql MCP tool is the one audited read, and it is recorded twice: a RequestSqlQuery row when the statement is dispatched, and a SqlQueryCompleted row when the monitored service answers, both carrying the same queryId. The page pairs them and shows one line per statement, at the time the operator acted, with the outcome as a badge: Ran (with the row count and elapsed time), Refused (with the guard's reason), or Failed (a timeout or engine error). The statement's first line sits under the outcome; "Show" expands the full statement beside the outcome's numbers.

A request with no answer is kept as its own line, badged No outcome recorded — a statement that was dispatched and never answered (service down, a lost reply) is exactly what an audit log has to show, so the attempt row is never collapsed away and never reads as a success. A completion whose request has scrolled out of the fetched window shows on its own, as the outcome it is.

Choosing RequestSqlQuery in the Action filter shows every statement this way; the filter is applied after pairing, so it cannot render answered statements as unanswered.

HardDeleteTenant Entries ​

A HardDeleteTenant row carries extra parameters:

ParameterMeaning
tenantIdThe exact tenant id the operator typed
databaseUriThe database that was dropped, recovered from the tenant's TenantAdded event, or (unknown) when it cannot be

These are written by the console's own hard-delete request; click "Show (2)" to expand them. The row written when the command is relayed to the monitored service, which is the only row for a hard delete made over MCP, records tenantId only. Audit entries for hard deletes are intentionally verbose because the action is irreversible; the parameters block lets you reconstruct the exact state at the moment of click.

Pagination ​

Bottom of the page: 50 entries per page, with a line stating which rows are shown out of how many. The page asks for 500 entries per fetch — that cap is a client-side choice, not a server limit: GET /api/critterwatch/audit-log defaults to 100 and honours whatever ?limit= a caller passes.

Audit entries are not pruned

There is no retention setting for the audit log and no pruner for AuditLogEntry — entries are kept indefinitely. Earlier revisions of this page pointed at an AuditLogRetentionDays setting; it has never existed. Timeline entries are pruned (30 days by default); the audit log is not.

Auto-Refresh ​

The Auto-Refresh switch at the right of the filter row polls every 10 seconds when enabled. Auto-refresh is off by default — the audit log doesn't change frequently and the display would jitter on every poll. Turn it on if you're following a coordinated incident in real time.

Refresh ​

The Refresh button next to the auto-refresh switch. Re-fetches with the current filters applied.

API ​

The audit table is backed by GET /api/critterwatch/audit-log with optional ?service=, ?action=, ?targetUri= and ?channel= (Console, Mcp, System or Unknown) query parameters. Each row carries channel and, for MCP, client. Operators with shell access can query the same data directly with curl for offline analysis or scripted exports. The endpoint's default limit is 100 rows; the page asks for more.

There is no CSV export — the JSON from this endpoint is the export.