Sign inSign up

marceloalmeida/es2csv-docker

By marceloalmeida

Updated almost 6 years ago

ES2CSV

Image
0

416

marceloalmeida/es2csv-docker repository overview

ES2CSV

Usage

Starting container
docker run -it -v $PWD/configs:/es2csv/configs -v $PWD/data:/es2csv/data es2csv bash
Running extraction
es2csv -u 'http://localhost:9200' -i 'index-pattern-*' -r -q @configs/query.json -o data/output.csv -s 10000
Query example
{
  "sort": { "@timestamp": "asc" },
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "@timestamp": {
              "format": "strict_date_optional_time",
              "gte": "2020-05-29T19:28:26.866Z",
              "lte": "2020-05-29T19:43:26.866Z"
            }
          }
        }
      ],
      "filter": [
        {
          "match_all": {}
        }
      ],
      "should": [],
      "must_not": [
        {
          "match_phrase": {
            "source": {
              "query": "nginx"
            }
          }
        },
      ]
    }
  }
}

Tag summary

Content type

Image

Digest

Size

67.1 MB

Last updated

almost 6 years ago

docker pull marceloalmeida/es2csv-docker