Flask interface to easily view indices, doc_types and documents in elasticsearch cluster
This is a Python-Flask based application which displays all the indices in your Elasticsearch cluster listing all the doc_types in each index. Also, documents of each doc_type in an index can be seen in a clear JSON format.
Note : Recommended Python version is 2.7
- In terminal, run
sudo apt-get install python python-pip(Install python and pip if not already installed) - Run
sudo apt-get install python-virtualenv(Install python virtual environment) - Clone the repository and in the project folder, run
virtualenv venv(Create virtual env for the project) - Enter
source venv/bin/activate(Activate the virtual env) - Run
pip install -r requirements.txt(pip will install all dependencies listed in the requirements file) - Use
deactivateto come out of virtual environment
- In terminal, run
sudo apt-get install python python-pip(Install python and pip if not already installed) - Clone the repository and in the project folder, run
pip install -r requirements.txt(pip will install all dependencies listed in the requirements file) (Usesudoin command if needed)
Note : The requirements file basically installs the following pip packages : flask , requests , elasticsearch
- If you are using virtual env, run
source venv/bin/activateto activate it otherwise skip this step. - Ensure Elasticsearch service is running on your machine (on port 9200).
- Run
python app.pyin the project folder.
(Note: The application is currently set to run on port 5001. You can change this port inapp.pyfile) - Open
http://localhost:5001in browser. (Or whatever is the server and port) - A tabular display of indices and doc_types will be shown. Click on a doc_type to see corresponding documents.
- Change the count of maximum documents fetched by providing value in input box. (set to 1 by default)