Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wfxr/elastic-tunnel
Tools for downloading data from elasticsearch
https://github.com/wfxr/elastic-tunnel
Last synced: about 1 month ago
JSON representation
Tools for downloading data from elasticsearch
- Host: GitHub
- URL: https://github.com/wfxr/elastic-tunnel
- Owner: wfxr
- License: other
- Created: 2018-11-30T10:08:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-02T02:13:14.000Z (almost 6 years ago)
- Last Synced: 2024-11-16T23:28:11.940Z (3 months ago)
- Language: Kotlin
- Size: 86.9 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# elastic-tunnel
Tools for downloading data from elasticsearch cluster.
## Usage
```
usage: elastic-tunnel -i -q -o [...]
-f,--fields Fields to download
-h,--host Elasticsearch host url
-i,--index Elasticsearch index name
-l,--limit Max entries to download
-o,--output Output format [JSON|CSV]
-p,--pass Elasticsearch user password
--pretty Pretty printing
-q,--query Query file
-s,--slice Elasticsearch Scroll slice
--scroll Elasticsearch scroll timeout
--size Elasticsearch scroll size
-u,--user Elasticsearch user name
```## Config
Option `host`, `user` and `pass` can be loaded from the config file, eg:
```
ES_HOST=http://192.168.1.1:9200
ES_USER=user
ES_PASS=pass
```The program will try to read `.ecsonfig` in the working directory at first.
Then try to read `$HOME/.esconfig` if it fails.## Example
```
elastic-tunnel -i twitter -f id,user -q query.json -o json --pretty
````query.json` may like this:
```bash
{
"term": {
"country": "China"
}
}
```## License
The MIT License ([MIT](https://wfxr.mit-license.org/2019))
Copyright (c) Wenxuan Zhang