Lucenia CLI
The Lucenia CLI command line interface (lucenia-cli) lets you manage your Lucenia cluster from the command line and automate tasks.
Profiles let you easily access different clusters or sign requests with different credentials. lucenia-cli supports unauthenticated requests, HTTP basic signing, and IAM signing for Amazon Web Services.
This example moves a detector (ecommerce-count-quantity
) from a staging cluster to a production cluster:
lucenia-cli ad get ecommerce-count-quantity --profile staging > ecommerce-count-quantity.json
lucenia-cli ad create ecommerce-count-quantity.json --profile production
lucenia-cli ad start ecommerce-count-quantity.json --profile production
lucenia-cli ad stop ecommerce-count-quantity --profile staging
lucenia-cli ad delete ecommerce-count-quantity --profile staging
Install
-
Download and extract the appropriate installation package for your computer.
-
Make the
lucenia-cli
file executable:chmod +x ./lucenia-cli
-
Add the command to your path:
export PATH=$PATH:$(pwd)
-
Confirm the CLI is working properly:
lucenia-cli --version
Profiles
Profiles let you easily switch between different clusters and user credentials. To get started, run lucenia-cli profile create
with the --auth-type
, --endpoint
, and --name
options:
lucenia-cli profile create --auth-type basic --endpoint https://localhost:9200 --name docker-local
Alternatively, save a configuration file to ~/.lucenia-cli/config.yaml
:
profiles:
- name: docker-local
endpoint: https://localhost:9200
user: admin
password: foobar
- name: aws
endpoint: https://some-cluster.us-east-1.es.amazonaws.com
aws_iam:
profile: ""
service: es
Usage
lucenia-cli commands use the following syntax:
lucenia-cli <command> <subcommand> <flags>
For example, the following command retrieves information about a detector:
lucenia-cli ad get my-detector --profile docker-local
For a request to the Lucenia CAT API, try the following command:
lucenia-cli curl get --path _cat/plugins --profile aws
Use the -h
or --help
flag to see all supported commands, subcommands, or usage for a specific command:
lucenia-cli -h
lucenia-cli ad -h
lucenia-cli ad get -h