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#
| Command | Description | Type |
|---|---|---|
| tdx audit list | List control events, newest first. | Read |
| tdx audit show | Read one control event. | Read |
| tdx audit stream | Follow control events as they are recorded. | Read |
| tdx audit status | Read 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.
# GET /control/v1/events
tdx audit list [flags]Optional flags
| Flag | Type | Default | Description |
|---|---|---|---|
--since | datetime | Only events that occurred at or after this instant. | |
--until | datetime | Only events that occurred at or before this instant. | |
--category | one of audit, operational | Audit or operational. | |
--event-type | string | Event type; the gateway's lowercase name (a letter, then up to 127 lowercase letters, digits, dots or underscores). | |
--action | string | Audit action; the gateway's lowercase name (a letter, then up to 127 lowercase letters, digits, dots or underscores). | |
--outcome | one of committed, rejected, failed, partial, cancelled | Terminal outcome. | |
--resource-type | string | Resource type; the gateway's lowercase name (a letter, then up to 127 lowercase letters, digits, dots or underscores). | |
--resource-id | string | Resource id. | |
--operation-id | string | Operation id. | |
--workspace-id | string | Only events scoped to this public workspace id. | |
--limit | integer | Page size; the gateway clamps it to 1..200 and defaults to 50. | |
--cursor | string | Opaque nextCursor from a previous audit list page with the same filters; pass it as --cursor=<nextCursor>. |
Output fields (inside data)
| Field | Type | Description |
|---|---|---|
events | public-control-event[] | Projected control events. |
hasMore | boolean | Whether a further page exists. |
nextCursor | string|null | Gateway continuation cursor; null on the final page. |
earliest | string|null | Earliest 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.
# GET /control/v1/events/:eventId
tdx audit show --id <string> [flags]Required flags
| Flag | Type | Default | Description |
|---|---|---|---|
--id | string | Event id: 1-512 printable ASCII characters without whitespace; never a credential. |
Output fields (inside data)
| Field | Type | Description |
|---|---|---|
event | public-control-event | The 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.
# GET /control/v1/events/stream
tdx audit stream [flags]Optional flags
| Flag | Type | Default | Description |
|---|---|---|---|
--cursor | string | Resume 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-events | integer | Stop with exit 0 after printing this many events. | |
--idle-timeout | integer | Seconds 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)
| Field | Type | Description |
|---|---|---|
event | public-control-event | The projected control event. |
cursor | string | Stream 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.
# GET /control/v1/status
tdx audit status [flags]Output fields (inside data)
| Field | Type | Description |
|---|---|---|
mode | string | Journal mode: local-required, local-best-effort or off. |
local | string | Local journal health: on, off or degraded. |
mutationReady | boolean | Whether privileged mutations are currently accepted. |
unsafeOverride | boolean | Whether audit is disabled by an unsafe operator override (mode off). |
writer | control-writer | Single-writer ownership: owned, conflict, owner node, replica and language ids, last heartbeat. |
journal | control-journal | Journal id, generation, retained sequence range, segments, bytes and oldest event age. |
queues | control-queues | Audit and operational queue depth and capacity, dropped operational events. |
exporters | control-exporter[] | Exporter id, sanitized origin, state, lag and queue depth. |
Examples
Read the masked public projection as versioned JSON:
tdx audit status --jsonSelect declared output fields:
tdx audit status --json=mode,mutationReadySee also: tdx observability status, tdx doctor