Appearance
systemslab infra log
| Description | List machine lifecycle events (instance requests, launches, assignments, terminations, ...), newest first. |
|---|---|
| Usage | systemslab infra log [OPTIONS] |
Description
The systemslab infra log command lists entries from the machine event log — one row per lifecycle event an EC2 instance or instance_request went through: requested, launched, registered, assigned, released, terminated, denied, and so on.
Each row shows event (what happened), actor (who or what caused it — scheduler, infra-manager, or operator:<name>), and, when known, the instance-id/host-id/context-id it happened to. actor is caller-asserted, not authenticated — see systemslab infra approve for what that means.
This command reads over GraphQL. Results are always newest-first.
Examples
Everything that happened to one instance:
sh
systemslab infra log --instance-id i-0123456789abcdef0Walk the log two pages at a time, oldest boundary first — use the at/id of the last row of one page as the cursor for the next:
sh
systemslab infra log --limit 2
systemslab infra log --limit 2 --before-at <at> --before-id <id>See why a launch failed — details carries the AWS error text for launch_failed events, but is left out of the default columns since it can be large:
sh
systemslab infra log --event launch_failed --field at --field detailsOptions
| Option | Default | Description |
|---|---|---|
--instance-id | Only show events for this cloud provider instance id. | |
--host-id | Only show events for this host. | |
--context-id | Only show events for this context. | |
--event | Only show events of this kind. This flag can be provided multiple times to match more than one kind. Omit it to show every kind. Valid values are the machine event kinds SystemsLab records, e.g. requested, approval_requested, approved, denied, launch_submitted, launched, registered, reused, assigned, released, idle_expired, terminate_requested, terminated, launch_failed, registration_timeout, spot_interruption_warned, spot_interrupted, replacement, orphan_detected, denied_allowlist, denied_capacity_cap, waiting_context_cap, waiting_capacity_cap, expired, and paused_manual_alloc. Run systemslab infra log --event bogus to see the full list in an error message. | |
--before-at | Pagination cursor: only show events strictly older than this timestamp. Must be given together with --before-id; use the at of the last row of the previous page. | |
--before-id | See --before-at; use the id of the last row of the previous page. | |
--limit | 100 | The maximum number of entries to show, from 1 to 1000. |
-f, --field | at, event, instance-id, context-id, actor | Specifies fields to be printed for each log entry. This flag can be provided multiple times to specify multiple fields to show. The defaults are only used if no fields are requested. Valid fields are:
host-id on an event with no associated host) prints as -. |
-H, --no-header | Do not emit a table header with the column names. | |
-A, --no-align | Switches to unaligned output mode. | |
-F, | " " | Use this separator as the field separator when emitting unaligned output. |
-R, | "\n" | Use this separator as the record separator for unaligned output. |
Common Options
| Option | Default | Description |
|---|---|---|
--systemslab-url | The URL at which to access the systemslab server. | |
--color | auto | Controls when color is used in the output. Possible values are auto, always, and never. |
--output-format | long | Output format to use when outputting messages. long will result output designed to be human-readable while short is short output meant to be used within scripts. |
Environment Variables
| Variable | Description |
|---|---|
SYSTEMSLAB_URL | Specify the URL used to contact the SystemsLab server. Equivalent to --systemslab-url. |