# Logstash won't parse CSV to elasticsearch

**URL:** https://discuss.elastic.co/t/logstash-wont-parse-csv-to-elasticsearch/177156
**Category:** Logstash
**Created:** [April 16, 2019, 9:25pm UTC](https://discuss.elastic.co/t/logstash-wont-parse-csv-to-elasticsearch/177156 "2019-04-16T21:25:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ac3](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@Ac3](https://discuss.elastic.co/u/Ac3)
#### Post date: [April 16, 2019, 9:25pm UTC](https://discuss.elastic.co/t/logstash-wont-parse-csv-to-elasticsearch/177156/1 "2019-04-16T21:25:14Z")

</div>

I'm trying to parse a CSV file using Logstash to ElasticSearch. The index cannot be found in Kibana, and Logstash claims the config file is 'ok'. I bet the problem is obvious, I just can't see it.

Can anyone help me debug this?  
Thanks

Logstash config

```auto
input {
    file {
        path => "C:\ProgramData\FDA\output1\processed\domain.csv"
        start_position => "beginning"
        sincedb_path => "NUL"
    }
}
filter {
    csv {
        separator => ","
        columns => ["Disk Location", "Domain Name", "Url"]

    }

    mutate {convert => ["Disk Location", "integer"]}

}
output {
    elasticsearch {
        hosts => ["http://localhost:9200"]
        index => "domain"

    }
    stdout { codec => rubydebug }
}

```

Output from cmd "logstash -f C:\ProgramData\FDA\logstash.conf"

```auto
:\ProgramData\FDA\logstash-7.0.0\logstash-7.0.0\bin>logstash -f C:\ProgramData\FDA\logstash.conf
Sending Logstash logs to C:/ProgramData/FDA/logstash-7.0.0/logstash-7.0.0/logs which is now configured via log4j2.properties
[2019-04-16T21:43:54,070][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-04-16T21:43:54,084][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"7.0.0"}
[2019-04-16T21:43:59,736][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://localhost:9200/]}}
[2019-04-16T21:43:59,871][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://localhost:9200/"}
[2019-04-16T21:43:59,905][INFO][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>7}
[2019-04-16T21:43:59,908][WARN][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}
[2019-04-16T21:43:59,926][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["http://localhost:9200"]}
[2019-04-16T21:43:59,938][INFO][logstash.outputs.elasticsearch] Using default mapping template
[2019-04-16T21:43:59,959][INFO][logstash.javapipeline] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>1000, :thread=>"#<Thread:0x16b87b1 run>"}
[2019-04-16T21:44:00,046][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"index_patterns"=>"logstash-*", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s", "number_of_shards"=>1, "index.lifecycle.name"=>"logstash-policy", "index.lifecycle.rollover_alias"=>"logstash"}, "mappings"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}
[2019-04-16T21:44:00,449][INFO][logstash.javapipeline] Pipeline started {"pipeline.id"=>"main"}
[2019-04-16T21:44:00,520][INFO][filewatch.observingtail] START, creating Discoverer, Watch with file and sincedb collections
[2019-04-16T21:44:00,526][INFO][logstash.agent] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-04-16T21:44:00,938][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}

```

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 16, 2019, 10:02pm UTC](https://discuss.elastic.co/t/logstash-wont-parse-csv-to-elasticsearch/177156/2 "2019-04-16T22:02:31Z")

</div>

> [@Ac3](#):
>
> path =\> "C:\ProgramData\FDA\output1\processed\domain.csv"

Use forward slash in the file input path option.

---

<div class="post-metadata">

### Author: ![Ac3](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@Ac3](https://discuss.elastic.co/u/Ac3)
#### Post date: [April 16, 2019, 10:27pm UTC](https://discuss.elastic.co/t/logstash-wont-parse-csv-to-elasticsearch/177156/3 "2019-04-16T22:27:19Z")

</div>

OMG this worked! I want to die... been looking at this all day. Thanks @Badger

---

<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: [May 14, 2019, 10:27pm UTC](https://discuss.elastic.co/t/logstash-wont-parse-csv-to-elasticsearch/177156/4 "2019-05-14T22:27:25Z")

</div>

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