tdx audit#

Read and follow the audit log (the dashboard's Events tab).

Read and follow the audit log (the dashboard's Events tab): the control-event journal, which records both audit and operational events of control-plane changes. list, show and stream require audit.read. status reads the journal, writer and queue status and requires install-wide status.read instead.

Every command also takes the global flags and reads the environment variables that the command reference lists once.

Commands#

CommandDescriptionType
tdx audit listList control events, newest first.Read
tdx audit showRead one control event.Read
tdx audit streamFollow control events as they are recorded.Read
tdx audit statusRead control-plane journal, writer and queue status.Read

tdx audit list#

List control events, newest first.

Reads

Read one page of the control-event journal. A cursor the journal no longer holds (pruned, or from a replaced journal) fails with CURSOR_EXPIRED (exit 6); restart without --cursor. earliest is the earliest retained cursor. Without filters, nextCursor and earliest also resume audit stream, and a stream cursor continues this list. A value longer than 4096 characters prints as [withheld: too long] on its own while the rest prints, and masking still sees it. A nextCursor or earliest longer than 2048 characters prints as [withheld: too long] while hasMore keeps the gateway's value; --cursor refuses the marker before any request. See Audit event fields and Observability filters and output.

Shell
# GET /control/v1/events
tdx audit list [flags]

Optional flags

FlagTypeDefaultDescription
--sincedatetimeOnly events that occurred at or after this instant.
--untildatetimeOnly events that occurred at or before this instant.
--categoryone of audit, operationalAudit or operational.
--event-typestringEvent type; the gateway's lowercase name (a letter, then up to 127 lowercase letters, digits, dots or underscores).
--actionstringAudit action; the gateway's lowercase name (a letter, then up to 127 lowercase letters, digits, dots or underscores).
--outcomeone of committed, rejected, failed, partial, cancelledTerminal outcome.
--resource-typestringResource type; the gateway's lowercase name (a letter, then up to 127 lowercase letters, digits, dots or underscores).
--resource-idstringResource id.
--operation-idstringOperation id.
--workspace-idstringOnly events scoped to this public workspace id.
--limitintegerPage size; the gateway clamps it to 1..200 and defaults to 50.
--cursorstringOpaque nextCursor from a previous audit list page with the same filters; pass it as --cursor=<nextCursor>.

Output fields (inside data)

FieldTypeDescription
eventspublic-control-event[]Projected control events.
hasMorebooleanWhether a further page exists.
nextCursorstring|nullGateway continuation cursor; null on the final page.
earlieststring|nullEarliest retained cursor; null for an empty journal.

tdx audit show#

Read one control event.

Reads

Read one control event by its event id. A value longer than 4096 characters prints as [withheld: too long] on its own while the rest prints, and masking still sees it. See Audit event fields and Observability filters and output.

Shell
# GET /control/v1/events/:eventId
tdx audit show --id <string> [flags]

Required flags

FlagTypeDefaultDescription
--idstringEvent id: 1-512 printable ASCII characters without whitespace; never a credential.

Output fields (inside data)

FieldTypeDescription
eventpublic-control-eventThe projected control event.

tdx audit stream#

Follow control events as they are recorded.

Reads

Follow the journal over server-sent events and print one compact JSON line per event as it arrives, the same with or without --json; --json=<fields> selects event and cursor per line. --jq is refused before any request; pipe the lines to jq -c instead. Heartbeats are not printed and a partial frame is never printed. Connecting is limited to 3 seconds; afterwards there is no total deadline, only the idle timeout. Each frame is masked with the same policy as api, learning aliases from that frame only, unlike audit list, which learns them from the whole page: a secret learned from one frame is not masked when a later frame echoes it under an innocent name. Body positions of a known or learned gateway token are counted across the whole session: a value in a frame that would take a token past its limit prints as █, a value showing only positions already printed prints, and lines already printed are never masked after the fact. A token learned from a frame is counted from that frame on: positions of it printed in earlier frames, before the CLI could recognise it, are not counted and cannot be retracted. The bearer the CLI knows is counted from the first frame. A learned token stays tracked for the rest of the session; once the session tracks more than 1024 tokens the stream stops with OUTPUT_MASK_LIMIT (exit 7) rather than forget one. A frame that cannot be masked, or whose cursor masking would change, stops the stream with an error and is not printed, while earlier lines stay on stdout. A frame over 1 MiB fails with RESPONSE_TOO_LARGE. --max-events and the first SIGINT or SIGTERM stop with exit 0 and close the connection, even while a line waits for stdout; that pending line may then be left incomplete, so a reader that later drains the pipe can see a truncated last line, while every earlier line is complete. A second signal terminates by default. A consumer closing stdout is detected on the next event write, which then stops with exit 0 and closes the connection. Until an event is written, a stream whose consumer has closed ends only on the idle timeout (exit 7 STREAM_IDLE_TIMEOUT), a signal (exit 0) or the gateway ending the stream (exit 7 STREAM_CLOSED); heartbeats reset the idle timer, so --idle-timeout does not bound a heartbeat-only stream. Any other stdout write failure exits 1 with OUTPUT_WRITE_FAILED. The gateway ending the stream exits 7 STREAM_CLOSED; resume with --cursor set to the cursor of the last printed line. A cursor the journal no longer holds fails with CURSOR_EXPIRED (exit 6); restart without --cursor. A value longer than 4096 characters prints as [withheld: too long] on its own while the rest prints, and masking still sees it. See Audit event fields. --dry-run still performs this read.

Shell
# GET /control/v1/events/stream
tdx audit stream [flags]

Optional flags

FlagTypeDefaultDescription
--cursorstringResume after the event this cursor names: the cursor of a printed line, or a nextCursor or earliest from an audit list without filters; pass it as --cursor=<cursor>. Omitted: a bounded backfill of recent events, then live events.
--max-eventsintegerStop with exit 0 after printing this many events.
--idle-timeoutintegerSeconds without any bytes before stopping with STREAM_IDLE_TIMEOUT (exit 7); 1..3600, default 60. Heartbeats are bytes and reset it, so it does not bound a heartbeat-only stream. The gateway heartbeats every 15 seconds by default.

Output fields (inside data)

FieldTypeDescription
eventpublic-control-eventThe projected control event.
cursorstringStream cursor of this event; pass it to --cursor to resume after it.

Prints one JSON object per line as events arrive, so --jq is refused; pipe the lines to jq -c instead.

tdx audit status#

Read control-plane journal, writer and queue status.

Reads

Requires install-wide status.read. Reads GET /control/v1/status: the audit journal mode, local journal health, whether privileged mutations are accepted, the unsafe-override flag, single-writer ownership, the retained journal range, queue health and configured exporters. The gateway's object and apiVersion are validated, not printed. Every printed value comes from one fail-closed masking pass over the request, the whole gateway reply (including fields the CLI drops) and the CLI's projection, before selection/jq; █ marks masked values. mode and local are printed as the CLI's own validated literals. A reply that cannot be masked within the fixed limits fails with OUTPUT_MASK_LIMIT (exit 7) and no values; a malformed reply fails with INVALID_RESPONSE (exit 7). --dry-run still performs this read.

Shell
# GET /control/v1/status
tdx audit status [flags]

Output fields (inside data)

FieldTypeDescription
modestringJournal mode: local-required, local-best-effort or off.
localstringLocal journal health: on, off or degraded.
mutationReadybooleanWhether privileged mutations are currently accepted.
unsafeOverridebooleanWhether audit is disabled by an unsafe operator override (mode off).
writercontrol-writerSingle-writer ownership: owned, conflict, owner node, replica and language ids, last heartbeat.
journalcontrol-journalJournal id, generation, retained sequence range, segments, bytes and oldest event age.
queuescontrol-queuesAudit and operational queue depth and capacity, dropped operational events.
exporterscontrol-exporter[]Exporter id, sanitized origin, state, lag and queue depth.

Examples

Read the masked public projection as versioned JSON:

Shell
tdx audit status --json

Select declared output fields:

Shell
tdx audit status --json=mode,mutationReady

See also: tdx observability status, tdx doctor