Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit 2ab4f7e

Browse files
authored
Merge pull request #448 from opendistro/odfe-cli-updates
odfe-cli syntax changes, adds KNN
2 parents 2d893bd + e3fa373 commit 2ab4f7e

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

docs/cli/index.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ has_children: false
99

1010
The Open Distro for Elasticsearch command line interface (odfe-cli) lets you manage your ODFE cluster from the command line and automate tasks.
1111

12-
Currently, odfe-cli only supports the [Anomaly Detection](../ad/) plugin. You can create and delete detectors, start and stop them, and use profiles to easily access different clusters or sign requests with different credentials.
12+
Currently, odfe-cli supports the [Anomaly Detection](../ad/) and [k-NN](../knn/) plugins, along with arbitrary REST API paths. Among other things, you can use odfe-cli create and delete detectors, start and stop them, and check k-NN statistics.
13+
14+
Profiles let you easily access different clusters or sign requests with different credentials. odfe-cli supports unauthenticated requests, HTTP basic signing, and IAM signing for Amazon Web Services.
1315

1416
This example moves a detector (`ecommerce-count-quantity`) from a staging cluster to a production cluster:
1517

@@ -47,28 +49,25 @@ odfe-cli ad delete ecommerce-count-quantity --profile staging
4749

4850
## Profiles
4951

50-
Profiles let you easily switch between different clusters and user credentials. To get started, run `odfe-cli profile create` and specify a unique profile name:
52+
Profiles let you easily switch between different clusters and user credentials. To get started, run `odfe-cli profile create` with the `--auth-type`, `--endpoint`, and `--name` options:
5153

52-
```
53-
$ odfe-cli profile create
54-
Enter profile's name: default
55-
Elasticsearch Endpoint: https://localhost:9200
56-
User Name: <username>
57-
Password: <password>
54+
```bash
55+
odfe-cli profile create --auth-type basic --endpoint https://localhost:9200 --name docker-local
5856
```
5957

6058
Alternatively, save a configuration file to `~/.odfe-cli/config.yaml`:
6159

6260
```yaml
6361
profiles:
64-
- endpoint: https://localhost:9200
65-
username: admin
66-
password: foobar
67-
name: default
68-
- endpoint: https://odfe-node1:9200
69-
username: admin
70-
password: foobar
71-
name: dev
62+
- name: docker-local
63+
endpoint: https://localhost:9200
64+
user: admin
65+
password: foobar
66+
- name: aws
67+
endpoint: https://some-cluster.us-east-1.es.amazonaws.com
68+
aws_iam:
69+
profile: ""
70+
service: es
7271
```
7372
7473
@@ -83,7 +82,13 @@ odfe-cli <command> <subcommand> <flags>
8382
For example, the following command retrieves information about a detector:
8483

8584
```bash
86-
odfe-cli ad get my-detector --profile dev
85+
odfe-cli ad get my-detector --profile docker-local
86+
```
87+
88+
For a request to the Elasticsearch CAT API, try the following command:
89+
90+
```bash
91+
odfe-cli curl get --path _cat/plugins --profile aws
8792
```
8893

8994
Use the `-h` or `--help` flag to see all supported commands, subcommands, or usage for a specific command:

0 commit comments

Comments
 (0)