# Problem in importing csv with logstrash

**URL:** <https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332>\
**Category:** Logstash\
**Created:** [April 16, 2021, 6:40am UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332 "2021-04-16T06:40:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fady\_Hany](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fady_hany/32/83865_2.png) [@Fady\_Hany](https://discuss.elastic.co/u/Fady_Hany)\
**Post date:** [April 16, 2021, 6:40am UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/1 "2021-04-16T06:40:49Z")

</div>

i have read a lot of similar problems in this nice forum , but non of them fit my situation

my .conf file :

```
input {
      file {
        path => "E:/test/*.csv"
        start_position => "beginning"
        sincedb_path => "NUL"
      }
    }
        filter {
          csv {
            separator => ","
        columns => ["phone","id","name"]
      }
    }

output {
  elasticsearch {
    hosts => "http://localhost:9200"
    index => "test"
  }
  stdout {
    codec => rubydebug
  }
}

```

'''  
i have also tried sincedb\_path =\> "NULL" and checked my file permissions and checked the forward slashes  
but i always get stucked here

```
[2021-04-16T08:35:04,132][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ParNew"}
    [2021-04-16T08:35:04,133][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ConcurrentMarkSweep"}
    [2021-04-16T08:35:07,057][DEBUG][org.logstash.execution.PeriodicFlush] Pushing flush onto pipeline.
    [2021-04-16T08:35:08,673][DEBUG][logstash.instrument.periodicpoller.cgroup] One or more required cgroup files or directories not found: /proc/self/cgroup, /sys/fs/cgroup/cpuacct, /sys/fs/cgroup/cpu

```

i have tried to feed the data just from the stdin without the file path , and it worked

i have also tried on my windows machine and my ubuntu vps , and i couldn't import data to both machines  
i really hope i can find a solution soon

---

<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, 2021, 2:41pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/2 "2021-04-16T14:41:33Z")

</div>

Enable --log.level trace and review the message from the filewatch module. See [here](https://discuss.elastic.co/t/stuck-in-logstash/269704/15).

---

<div class="post-metadata">

**Author:** ![Fady\_Hany](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fady_hany/32/83865_2.png) [@Fady\_Hany](https://discuss.elastic.co/u/Fady_Hany)\
**Post date:** [April 16, 2021, 6:50pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/3 "2021-04-16T18:50:01Z")

</div>

thanks a lot for your fast response

here is the loop i am in for a long time without adding any index to my elasticsearch

i typed ` logstash -f test.conf --log.level trace`

and that what appears in the console :

```auto
[2021-04-16T20:46:40,279][DEBUG][org.logstash.execution.PeriodicFlush] Pushing flush onto pipeline. [2021-04-16T20:46:40,573][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ParNew"} [2021-04-16T20:46:40,576][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=>"ConcurrentMarkSweep"} [2021-04-16T20:46:40,653][TRACE][filewatch.discoverer] discover_files {"count"=>0} [2021-04-16T20:46:44,435][DEBUG][logstash.instrument.periodicpoller.cgroup] One or more required cgroup files or directories not found: /proc/self/cgroup, /sys/fs/cgroup/cpuacct, /sys/fs/cgroup/cpu

```

---

<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, 2021, 7:06pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/4 "2021-04-16T19:06:01Z")

</div>

If your configuration includes a file input then there will _always_ be trace level messages from filewatch. Did you redirect the output to a file and search for them?

---

<div class="post-metadata">

**Author:** ![Fady\_Hany](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fady_hany/32/83865_2.png) [@Fady\_Hany](https://discuss.elastic.co/u/Fady_Hany)\
**Post date:** [April 16, 2021, 7:18pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/5 "2021-04-16T19:18:36Z")

</div>

i am sorry  
but what does it mean to redirect the output to a file ?

---

<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, 2021, 7:37pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/6 "2021-04-16T19:37:27Z")

</div>

Try

`logstash -f test.conf --log.level trace > logstash.log`

---

<div class="post-metadata">

**Author:** ![Fady\_Hany](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fady_hany/32/83865_2.png) [@Fady\_Hany](https://discuss.elastic.co/u/Fady_Hany)\
**Post date:** [April 16, 2021, 9:10pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/7 "2021-04-16T21:10:11Z")

</div>

`[TRACE][filewatch.discoverer] discover_files {"count"=>0}`

---

<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, 2021, 9:21pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/8 "2021-04-16T21:21:14Z")

</div>

> [@Fady\_Hany](#):
>
> `path => "E:/test/*.csv"`

It is finding zero files that match that pattern. Is the E: drive mounted where you are running logstash, is the test directory readable by the user running logstash?

---

<div class="post-metadata">

**Author:** ![Fady\_Hany](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fady_hany/32/83865_2.png) [@Fady\_Hany](https://discuss.elastic.co/u/Fady_Hany)\
**Post date:** [April 16, 2021, 9:51pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/9 "2021-04-16T21:51:38Z")

</div>

i have also tried to copy the csv file to the C: drive where logstash is located also logstash is running as administrator but still getting the same results  
`[filewatch.discoverer] discover_files {"count"=>0}`

---

<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, 2021, 9:52pm UTC](https://discuss.elastic.co/t/problem-in-importing-csv-with-logstrash/270332/10 "2021-05-14T21:52:02Z")

</div>

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