This is a command-line library for interacting with ElasticSearch built on BASH.
Just maybe crazy enough to work! Or just yes?
It's just another project designed to improve knowledge of a number of topics.
Not even close, never will be.
As what? In production.. No. For fun? Maybe! For frustration? Definitely!
Where's the fun in me giving you all the answers? The design supports easy transitions to POSIX style parameters or whatever else.
Each command has configurations that determine how the commands are viewed etc. These are controlled through environment variables. Arguments necessary for the commands are positional arguments.
For example, if you want an overview of a specific index you can run:
$ ./elastic/indices-overview-by-name <indexName>
If you want to view it with column headings, set 'v'.
$ v=true ./elastic/indices-overview-by-name <indexName>
For help use -h
as the firt argument.
$ ./elastic/custer-health -h
The 'bootstrap' script determines the library path. If you want to change the library path then do so with:
$ export ELASTICSEARCH_BASH_API_PATH=/the/path
Set up the HTTP URL to ElasticSearch. Defaults to: http://0.0.0.0:9200
$ export ELASTICSEARCH_HOST="http://0.0.0.0:9200"
This will have to be run every time you open a terminal, or be put into your .bashrc
.
There's a menu system built in.. Run it with
(for console)
$ ./menu
or
(for windowed)
$ ./menu gui
The menu is clearly incomplete, but easy to modify.
The following material was used to put this together: