Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/pages/reference/cli/tctl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,16 @@ $ tctl bots instances list [<name>]
- `[<name>]` - an optional bot name. If provided, filters the result to show
only instances for the named bot. Otherwise, shows all instances for all bots.

### Flags

| Name | Default Value(s) | Allowed Value(s) | Description |
| - | - | - | - |
| `--search` | none | A search term | Optional. Filters the returned bot instances using a fuzzy search based on the term provided. |
| `--query` | none | Teleport predicate language query | Optional. Filters the returned bot instances based on the Teleport predicate language query provided. |
| `--sort-index` | `bot_name` | `bot_name`, `active_at_latest`, `version_latest`, `host_name_latest` | Optional. Sorts the returned bot instances using the given field. |
| `--sort-order` | `ascending` | `ascending`, `descending` | Optional. Sorts the returned bot instances in the given order. |
| `--format` | `text` | `text`, `json` | If set to `json`, returns results as a machine-readable JSON string. |

### Examples

This shows all known instances for the bot named "example":
Expand All @@ -590,6 +600,25 @@ This shows all known instances for the bot named "example":
$ tctl bots instance list example
```

This shows all known instances which contain the term "github";

```code
$ tctl bots instance list --search github
```

Searchable fields include; bot name, instance id, hostname, join method, version

This shows all known instances with a version older than "18.0.0";

```code
$ tctl bots instance list --query `older_than(status.latest_heartbeat.version, "18.0.0")`
```
Version-specific functions include;

- `newer_than(version, comparison)`
- `older_than(version, comparison)`
- `between(version, lower (inclusive), upper (exclusive))`

### Global flags

These flags are available for all commands: `--debug, --config`. Run
Expand Down
Loading