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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,58 @@ console clusters cat-indices
```
{% include copy.html %}

### Execute HTTP requests against clusters

To run OpenSearch or Elasticsearch APIs directly against the configured source or target cluster, use a `curl`-like interface. Authentication, TLS, and endpoints are obtained from your console configuration.

```sh
console clusters curl <source_cluster|target_cluster> <path> [OPTIONS]
```
{% include copy.html %}

#### Arguments

* `<source_cluster|target_cluster>` — Specify `source_cluster` or `target_cluster` to call.
* `<path>` — The API endpoint to call on the cluster (for example, `/_cat/indices` or `/my-index/_search`).

#### Options

* `--json <JSON_DATA>` — Send a JSON body and automatically set `Content-Type: application/json`.
* `-X, --request <METHOD>` — The HTTP method (`GET`, `POST`, `PUT`, `DELETE`, or `HEAD`). Default is `GET`.
* `-H, --header <HEADER>` — A custom header, for example, `-H 'Accept: application/json'`. You can specify multiple headers, for example, `-H 'Accept: application/json' -H 'Authorization: Bearer TOKEN'`.
* `-d, --data <DATA>` — The raw request body.

#### Examples

*Get cluster health*:

```sh
console clusters curl source_cluster /_cluster/health
```
{% include copy.html %}

*List indexes as JSON*:

```sh
console clusters curl source_cluster "/_cat/indices?format=json&v=true"
```
{% include copy.html %}

*Create an index*:

```sh
console clusters curl target_cluster /my-new-index --json '{"settings":{"number_of_shards":3,"number_of_replicas":1}}'
```
{% include copy.html %}

*Run a query containing a body*:

```sh
console clusters curl source_cluster /_search --json '{"query":{"match_all":{}}}'
```
{% include copy.html %}


### Create a snapshot

Creates a snapshot of the source cluster and stores it in a preconfigured Amazon Simple Storage Service (Amazon S3) bucket.
Expand All @@ -45,34 +97,37 @@ console snapshot create
```
{% include copy.html %}

## Check snapshot status
### Check snapshot status

Runs a detailed check on the snapshot creation status, including estimated completion time:

```sh
console snapshot status --deep-check
```

{% include copy.html %}

## Evaluate metadata
### Evaluate metadata

Performs a dry run of metadata migration, showing which indexes, templates, and other objects will be migrated to the target cluster.

```sh
console metadata evaluate
```

{% include copy.html %}

## Migrate metadata
### Migrate metadata

Migrates the metadata from the source cluster to the target cluster.

```sh
console metadata migrate
```

{% include copy.html %}

## Start a backfill
### Start a backfill

If `Reindex-From-Snapshot` (RFS) is enabled, this command starts an instance of the service to begin moving documents to the target cluster:

Expand All @@ -84,12 +139,16 @@ console backfill start
```
{% include copy.html %}

## Check backfill status
### Check backfill status

Gets the current status of the backfill migration, including the number of operating instances and the progress of the shards.

```sh
console backfill status
```
{% include copy.html %}

## Start Traffic Replayer
### Start Traffic Replayer

If Traffic Replayer is enabled, this command starts an instance of Traffic Replayer to begin replaying traffic against the target cluster.
The `stop` command stops all active instances.
Expand All @@ -99,7 +158,7 @@ console replay start
```
{% include copy.html %}

## Read logs
### Read logs

Reads any logs that exist when running Traffic Replayer. Use tab completion on the path to fill in the available `NODE_IDs` and, if applicable, log file names. The tuple logs roll over at a certain size threshold, so there may be many files named with timestamps. The `jq` command pretty-prints each line of the tuple output before writing it to file.

Expand All @@ -108,7 +167,7 @@ console tuples show --in /shared-logs-output/traffic-replayer-default/[NODE_ID]/
```
{% include copy.html %}

## Show version
### Show version

Displays the version of the currently installed Migration Assistant.

Expand All @@ -117,11 +176,11 @@ console --version
```
{% include copy.html %}

## Help option
### Help option

All commands and options can be explored within the tool itself by using the `--help` option, either for the entire `console` application or for individual components (for example, `console backfill --help`). For example:

```bash
```sh
$ console --help
Usage: console [OPTIONS] COMMAND [ARGS]...

Expand Down