# File input not working

**URL:** <https://discuss.elastic.co/t/file-input-not-working/159016>\
**Category:** Logstash\
**Created:** [December 1, 2018, 11:10pm UTC](https://discuss.elastic.co/t/file-input-not-working/159016 "2018-12-01T23:10:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cowensel](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cowensel](https://discuss.elastic.co/u/cowensel)\
**Post date:** [December 1, 2018, 11:10pm UTC](https://discuss.elastic.co/t/file-input-not-working/159016/1 "2018-12-01T23:10:20Z")

</div>

I am looking to use logstash to ingest a csv file that contains some stats and then graph them. I have setup a file input but I am unable to get it to work.

My logstash config is  
input {  
file {  
path =\> "C:\logstash-6.4.2\files\*.csv"  
start\_position =\> "beginning"  
}  
}  
filter {  
csv {  
columns =\> ["Action","Apdex","Count","Avg (ms)","SD (ms)","Min (ms)","Max (ms)","Total (ms)","Total (% time)","Dissat (%)"]  
separator =\> ","  
}  
}  
output {  
elasticsearch {  
hosts =\> ["127.0.0.1:9200"]  
index =\> "stats-%{+YYYY.MM.dd}"  
template\_overwrite =\> true  
}  
stdout { codec =\> rubydebug }  
}

am I doing something incorrectly?

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [December 2, 2018, 2:56pm UTC](https://discuss.elastic.co/t/file-input-not-working/159016/2 "2018-12-02T14:56:24Z")

</div>

Are you getting any error messages?

---

<div class="post-metadata">

**Author:** ![cowensel](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cowensel](https://discuss.elastic.co/u/cowensel)\
**Post date:** [December 2, 2018, 7:54pm UTC](https://discuss.elastic.co/t/file-input-not-working/159016/3 "2018-12-02T19:54:00Z")

</div>

unfortunately not.

the logstash logs show logstash starts ok but it does not process anything and i'm unsure why.

---

<div class="post-metadata">

**Author:** ![AquaX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aquax/32/92006_2.png) [@AquaX](https://discuss.elastic.co/u/AquaX)\
**Post date:** [December 2, 2018, 9:41pm UTC](https://discuss.elastic.co/t/file-input-not-working/159016/4 "2018-12-02T21:41:51Z")

</div>

Then it's most likely one of two things:  
Your path does not contain the files that match your path pattern.  
-Check your path and files to make sure that they are ok.  
OR  
The sincedb is showing that all files have been processed  
-Delete the .sincedb file and restart logstash, if that works then you'll need to add some additional parameters to your config like setting the sincedb\_path to NUL.

---

<div class="post-metadata">

**Author:** ![cowensel](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cowensel](https://discuss.elastic.co/u/cowensel)\
**Post date:** [December 3, 2018, 8:08am UTC](https://discuss.elastic.co/t/file-input-not-working/159016/5 "2018-12-03T08:08:07Z")

</div>

Following the steps above setting the sincedb\_path to "NuLL" and checking the files all seemed ok. I then placed the logstash logs in debug I received the following in a loop  
2018-12-02T22:59:01,649][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

Downgrading to ELK 6.0.0 resolved the problem but now the csv has now uploaded ok.

---

<div class="post-metadata">

**Author:** ![cowensel](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cowensel](https://discuss.elastic.co/u/cowensel)\
**Post date:** [December 3, 2018, 12:05pm UTC](https://discuss.elastic.co/t/file-input-not-working/159016/6 "2018-12-03T12:05:52Z")

</div>

I have uploaded the file ok and I have added a mutate convert to the config but when imported it makes the columns 0 .  
The file has columns like col1:16591.07535,col 2: 2310, col3: 7950,col4: 1.5, col5: 180000, col6: 38300000  
but when imported to elastic it shows 0.  
The mutate section of config is  
convert =\> {  
"Apdex" =\> "integer"  
"Count" =\> "integer"  
"Avg (ms)" =\> "integer"  
"SD (ms)" =\> "integer"  
"Min (ms)" =\> "integer"  
"Max (ms)" =\> "integer"  
"Total (ms)" =\> "integer"  
"Total (% time)" =\> "integer"  
"Dissat (%)" =\> "integer"  
}  
What am I doing incorrectly?

---

<div class="post-metadata">

**Author:** ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)\
**Post date:** [December 5, 2018, 9:53am UTC](https://discuss.elastic.co/t/file-input-not-working/159016/7 "2018-12-05T09:53:31Z")

</div>

Hello,  
Make sure to change the path from  
path =\> "C:\logstash-6.4.2\files\*.csv"

to

path =\> "C:/logstash-6.4.2/files\*.csv"

Hope this helps you,

> [@Load csv file in logstash](https://discuss.elastic.co/t/load-csv-file-in-logstash/151319/3):
>
> Thanks for reply,hope this works fine, input { file { path =\> "D:/Balu/ELK-stack/csvfile.csv" start\_position =\> "beginning" sincedb\_path =\> "NUL" } } filter { csv { separator =\> "," columns =\> ["open","high","low","close","volume"] } } output { elasticsearch { hosts =\> "[http://localhost:9200](http://localhost:9200)" index =\> "wallet-address-index" } stdout { codec =\> rubydebug } }

---

<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 2, 2019, 9:53am UTC](https://discuss.elastic.co/t/file-input-not-working/159016/8 "2019-01-02T09:53:31Z")

</div>

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