# Export Index with Logstash?

**URL:** <https://discuss.elastic.co/t/export-index-with-logstash/161872>\
**Category:** Logstash\
**Created:** [December 21, 2018, 3:36pm UTC](https://discuss.elastic.co/t/export-index-with-logstash/161872 "2018-12-21T15:36:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre22](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@andre22](https://discuss.elastic.co/u/andre22)\
**Post date:** [December 21, 2018, 3:36pm UTC](https://discuss.elastic.co/t/export-index-with-logstash/161872/1 "2018-12-21T15:36:14Z")

</div>

Hi,

I am trying to export an index to a csv file with the following config:

```
input {
  elasticsearch {
    hosts => ["localhost:9200"]
    query => '{ "query": { "query_string": { "query": "*" } } }'
    index => "index-2017.04.01*"
    docinfo => true
  }
}
output {
  csv {
    fields => ["@timestamp", "field1", "field2"]
    path => "/tmp/csv-export.csv"
    }
}

```

However; if I start logstash, no csv file is created and the log shows this:

```
[2018-12-21T16:33:56,589][INFO][logstash.runner] Starting Logstash {"logstash.version"=&gt;"6.5.2"}
[2018-12-21T16:34:04,362][INFO][logstash.pipeline] Starting pipeline {:pipeline_id=&gt;"main", "pipeline.workers"=&gt;4, "pipeline.batch.size"=&gt;125, "pipeline.batch.delay"=&gt;50}
[2018-12-21T16:34:05,775][INFO][logstash.pipeline] Pipeline started successfully {:pipeline_id=&gt;"main", :thread=&gt;"#&lt;Thread:0x237e644b run&gt;"}
[2018-12-21T16:34:05,944][INFO][logstash.agent] Pipelines running {:count=&gt;1, :running_pipelines=&gt;[:main], :non_running_pipelines=&gt;[]}
[2018-12-21T16:34:06,984][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=&gt;9600}
[2018-12-21T16:34:10,603][INFO][logstash.pipeline] Pipeline has terminated {:pipeline_id=&gt;"main", :thread=&gt;"#&lt;Thread:0x237e644b run&gt;"}

```

What could be the reason for this?  
thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 18, 2019, 3:36pm UTC](https://discuss.elastic.co/t/export-index-with-logstash/161872/2 "2019-01-18T15:36:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
