This is a multi purpose command-line utility written in Go to interact with an Elasticsearch Service deployment.
It can:
- fetch details of traffic filter rulesets associated with the deployment
- collect Elasticsearch diagnostics for the deployment
- send simple GET API calls to the Elasticsearch cluster and display the result
-
Download a compiled release binary according to your architecture
-
Copy it somewhere in your PATH and rename it to
ess
(oress.exe
on Windows) -
Define an environment variable
ELASTIC_ESS_KEY
with the value of your Elastic Cloud API key
Once installed, you can use the utility as follows:
ess [-v] [-d|-t] <deployment_id> [Elasticsearch GET command]
-v
: Verbose mode (optional).-d
: Diagnostics mode, collect an Elasticsearch support diagnostics for the deployment.-t
: Traffic Filters mode, collect Traffic filters ruleset associated with the deployment.<deployment_id>
: ID of the Elasticsearch Service deployment.- [Elasticsearch GET command]: Command mode, run an Elasticsearch API GET query, like
_cat/indices
Command mode is mutually exclusive with Diagnostics or Traffic Filters mode.
ess -t abcdef1234567890abcdef1234567890
This command fetches and display ruleset details for the deployment with ID abcdef1234567890abcdef1234567890
.
ess abcdef1234567890abcdef1234567890 _cat/indices
ess abcdef1234567890abcdef1234567890 /_cat/indices
This command run the _cat/indices
API command on the Elasticsearch cluster of the deployment and display the results
ess abcdef1234567890abcdef1234567890 | jq '.version.number'
ess abcdef1234567890abcdef1234567890 / | jq '.version.number'
This command extracts the version number from the Elasticsearch API endpoint /
This utility is released under the MIT License. See LICENSE for details.