Skip to content

A set of shell scripts to compare indices, aliases and mappings between multiple Elasticsearch clusters

License

Notifications You must be signed in to change notification settings

janotaz/es_compare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch Compare

A set of scripts to compare indices, aliases and mappings between two elasticsearch clusters.

Usage

Create config files for the clusters you want to compare.

Cluster 1

# ./config/dev.config
URL="https://dev.domain.com:9200"
TOKEN="dXNlcm5hbWU6cGFzc3dvcmQK"

# TOKEN is the base64 encoded version of 'username:password'
# To encode this:
# - create a file called 'token'
# - add one line in the file containing the credentials:
#	username:password
# - run: `base64 -i token`

Cluster 2

# ./config/qa.config
URL="https://qa.domain.com:9200"
TOKEN="dXNlcm5hbWU6cGFzc3dvcmQK"

Run

Get the cluster info for dev

./get_es_stats.sh dev
Getting Elasticsearch statistics for dev (https://dev.domain.com:9200)
Getting indices.
Getting aliases.
Getting mappings.
  index1
  index2
  index3

Done.

Get the cluster info for qa

./get_es_stats.sh qa
Getting Elasticsearch statistics for dev (https://qa.domain.com:9200)
Getting indices.
Getting aliases.
Getting mappings.
  index1
  index2
  index3

Done.

Compare the two clusters:

./es_diff.sh dev qa

Windows

To run these scripts on Windows

About

A set of shell scripts to compare indices, aliases and mappings between multiple Elasticsearch clusters

Resources

License

Stars

Watchers

Forks

Languages