Overview

List and manage your ElasticSearch indices easily via command line.

Crafting very verbose JSON object to manipulate and view ElasticSeach indices is really hard!.

Elastictl - a command-line utility can certainly help you in managing ElasticSearch data more easier

Features

  • > Simple command, no verbose JSON syntax.
  • > Show output in tabular form, like MySQL. No need to read JSON objects
  • > Single-file application, no need to meddle with installing Kibana, Sense and its dependencies
  • > Makes every tedious operation really easy (renaming fields, listing indices etc)

Installation

Elastictl can be easily installed globally in your machine, it is just a single phar archive which packs everything you need. However, it has a few requirements to run:

  • PHP 5.5 or greater
  • lib-curl, ext-curl, ext-json extensions enabled
  • ElasticSearch Server

For Debian/RHEL OS

wget https://downloads.buonzz.com/elastictl.phar
sudo mv elastictl.phar  /usr/local/bin/elastictl
chmod +x /usr/local/bin/elastictl

For Mac

curl -o elastictl.phar 'https://downloads.buonzz.com/elastictl.phar'
sudo mv elastictl.phar  /usr/local/bin/elastictl
chmod +x /usr/local/bin/elastictl

You can verify the elastictl is installed properly by typing this command while in any folder:

elastictl -V

Congrats! you just had installed Scalp in your computer

Configuration

You need to place a configuration file in the folder where you plan to execute this command (usually in the home folder). The configuration file should be named .env . A sample .env file looks like below:

ES_HOST=127.0.0.1
ES_PROTOCOL=http
ES_PORT=9200
ES_USERNAME=null
ES_PASSWORD=null
ES_TIMEOUT=3
ES_LOGGING=false
ES_LOGFILE=/var/log/elastictl.log
MEMCACHED_SERVER=127.0.0.1


All these configuration options is optional! Yes, you can even just execute elastictl without configuration file at all, but that is assuming you are ok with the default values. When you did not specify a certain value, it will use the default value. This are the default values of each setting and its brief description

Setting Description Default Value
ES_HOST database hostname for the ElasticSearch Server 127.0.0.1
ES_PROTOCOL whether to use SSL or plain http when connecting to ElasticSearch http
ES_PORT port number for ElasticSearch 9200
ES_USER username to use to connect to ElasticSearch null
ES_PASSWORD password to use to connect to ElasticSearch null
ES_TIMEOUT How long a certain query should wait 3
ES_LOGGING whether logging is on or off false
ES_LOGFILE what is the location of the log file /var/log/elastictl.log
MEMCACHED_SERVER hostname of the memcached server 127.0.0.1

One other option is to define these variables in your .bash_profile or .bashrc files.

One time only

OnetimeOnly

A Java-based web application for securely sharing confidential information via one-time visit links.

Laravel Best Practices

Laravel Best Practices

A curated list of best practices in writing, maintaining and deploying Laravel applications.

Restler Boot

A Micro-framework for building Microservices.