/terraform-aws-elasticsearch

Requisite IAC Terraform code to deploy AWS managed Elasticsearch SaaS

Primary LanguageHCL

AWS Elasticsearch SaaS Cheat Sheet

Purpose

  • To help folks get started making remote Elasticsearch queries.
Kibana Web UI AWS Elastic SaaS
Kibana Dashboards:

https://mycompanyvpcelastickibanaurl.us-west-2.es.amazonaws.com/_plugin/kibana/app/kibana#/dashboards

Kibana Dev Tools Query Tool

https://mycompanyvpcelastickibanaurl.us-west-2.es.amazonaws.com/_plugin/kibana/app/kibana#/dev_tools/console?_g=()

Elasticsearch-HQ

If you think you need this tool, then your can run it locally with docker and remote connect to the cloud service:

docker run -p 5000:5000 elastichq/elasticsearch-hq

Now admin the cluster at:

Useful vars and commands, etc.

brew install httpie
  • Set var for ES cluster SaaS endpoint
export es="https://mycompanyvpcelasticurl.us-west-2.es.amazonaws.com.us-west-2.es.amazonaws.com"
http $es/_cat/indices
http "$es/_cat/indices?bytes=b&s=store.size:desc&v"
http $es/_cat/nodes?h=ip,port,heapPercent,name

Troubleshooting, notes, etc.

My Amazon ES cluster has more nodes than I originally provisioned

ref: https://aws.amazon.com/premiumsupport/knowledge-center/elasticsearch-more-nodes/

In the Monitoring tab of the Amazon Elasticsearch Service (Amazon ES) console, a cluster appears to have twice the number of nodes than were originally provisioned. Why?

Resolution

Amazon ES uses blue/green deployments to make most cluster configuration changes. During this process, Amazon ES provisions a new cluster with the specified number of nodes, copying the entire dataset from the existing cluster to the new cluster. When the data migration is complete, Amazon ES terminates the existing cluster, and the number of nodes returns to normal.

i.e. we can see that here:

Generate and Upload Randomized Test Data

python es_test_data.py --es_url=https://mycompanyvpcelasticurl.us-west-2.es.amazonaws.com.us-west-2.es.amazonaws.com