https://github.com/seeruk/es2csv
Elasticsearch to CSV exporter, written in Go.
https://github.com/seeruk/es2csv
csv dump elasticsearch exporter go index spreadsheet
Last synced: about 2 months ago
JSON representation
Elasticsearch to CSV exporter, written in Go.
- Host: GitHub
- URL: https://github.com/seeruk/es2csv
- Owner: seeruk
- License: mit
- Created: 2018-01-08T15:10:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-11-16T15:12:59.000Z (over 4 years ago)
- Last Synced: 2024-11-16T12:46:50.333Z (over 1 year ago)
- Topics: csv, dump, elasticsearch, exporter, go, index, spreadsheet
- Language: Go
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# es2csv
Elasticsearch to CSV exporter, written in Go.
## Installation
You'll need Go installed, then simply run:
```
$ go install github.com/seeruk/es2csv@latest
```
## Usage
`es2csv` is very easy to use. CSV output will go to stdout, any log output goes to stderr.
```
Usage of es2csv:
-fields string
A comma separated list of fields to include
-host string
The Elasticsearch host, e.g. 'http://localhost:9200'
-index string
An [optional] index to search within
-query string
A Lucene-syntax search query
-raw-query string
An Elasticsearch JSON query object
```
Example:
```
./es2csv \
-host "https://elasticsearch-prod-abc123.eu-west-1.es.amazonaws.com" \
-index "fluentd-*" \
-fields "error,code,request_id" \
-query "@log_name:auth.api AND _exists_:error"
```
## License
MIT