Limit restful requests to backend ElasticSearch cluster: Queries only.
Project description
Limit restful requests to backend ElasticSearch cluster: Queries only.
Requirements
Python 2.7
An ElasticSearch cluster to forward queries to
Install
I will assume you have Python installed (if not, here are Windows7 instructions)
git clone https://github.com/klahnakoski/esFrontLine.git cd esFrontLine pip install -r requirements.txt
Setup
You must right your own setting.jason file with the following properties set:
elasticsearch - (Array of) ElasticSearch host pointers
elasticsearch.host - URL of the ElasticSearch cluster that will accept query requests
elasticsearch.port - port for ES (default = 9200)
flask - flask.run() parameters (default port = 5000)
debug - turn on debugging
Here is an example of my settings.json file
{ "elasticsearch":[{ "host":"http://elasticsearch4.metrics.scl3.mozilla.com", "port":9200 },{ "host":"http://elasticsearch5.metrics.scl3.mozilla.com", "port":9200 },{ "host":"http://elasticsearch7.metrics.scl3.mozilla.com", "port":9200 },{ "host":"http://elasticsearch8.metrics.scl3.mozilla.com", "port":9200 }], "flask":{ "host":"0.0.0.0", "port":9292, "debug":false, "threaded":true, "processes":1 }, "debug":{ "log":[{ "filename": "./results/logs/app.log", "maxBytes": 10000000, "backupCount": 200, "encoding": "utf8" },{ "stream":"sys.stdout" }] } }
Execution
python app.py --settings-file <path_to_file_with_JSON_settings>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for esFrontLine-0.9.13316.win32-py2.7.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cb5c2341d67a07422ab5ebebb66fa89abb6153f13d6c3faf6c874c125dcb1b1 |
|
MD5 | aae3f8cedb9e5a59de99379d5591afd5 |
|
BLAKE2b-256 | 6f834bedd75c1b140f2a2c6cc80d2f659ff0be4a7df43fffba58e98a3bba1f5f |