# Logstash is keep on running

**URL:** <https://discuss.elastic.co/t/logstash-is-keep-on-running/141880>\
**Category:** Logstash\
**Created:** [July 27, 2018, 6:26am UTC](https://discuss.elastic.co/t/logstash-is-keep-on-running/141880 "2018-07-27T06:26:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_Dandotiya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepak_dandotiya/32/31843_2.png) [@Deepak\_Dandotiya](https://discuss.elastic.co/u/Deepak_Dandotiya)\
**Post date:** [July 27, 2018, 6:26am UTC](https://discuss.elastic.co/t/logstash-is-keep-on-running/141880/1 "2018-07-27T06:26:23Z")

</div>

Hi,

I am reading data from CSV filetest and dumping to Elasticsearch. Data is getting done properly and index is also getting created but Logstash process never ends. It has to be killed manually. please do help as the same i have to implement in my project.

Below is logstash config file:-

input {  
file {  
path =\> "/alt/deepak/logstash-6.2.4/s3bucket/test.csv"  
start\_position =\> "beginning"  
sincedb\_path =\>"/dev/null"  
}  
}  
filter {  
csv{  
separator =\> ","  
columns =\> ["emp\_id", "ename", "mgr\_id", "salary", "deptno"]  
}  
mutate { convert =\> ["emp\_id", "integer"] }  
mutate { convert =\> ["mgr\_id", "integer"] }  
mutate { convert =\> ["deptno", "integer"] }  
if [message] =~ /^emp\_id/ {  
drop {}  
}  
}

output {  
elasticsearch {  
hosts =\> "localhost"  
#document\_id =\> "%{org\_id}%{connection\_id}"  
document\_type =\> "emp\_data"  
index =\> "emp\_data\_index\_%{+YYYY\_MM\_dd}"  
}  
stdout{}  
}

Thanks,  
Deepak

---

<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:** [July 27, 2018, 11:52am UTC](https://discuss.elastic.co/t/logstash-is-keep-on-running/141880/2 "2018-07-27T11:52:53Z")

</div>

> [@Deepak\_Dandotiya](#):
>
> Data is getting done properly and index is also getting created but Logstash process never ends.

A file input is designed for tailing log files. So when logstash starts, even if you tell it to read the entire file using

```
start_position => "beginning"
sincedb_path =>"/dev/null"

```

it will then wait forever to see if more lines are appended to the file. Like "tail -f". This is working as expected.

---

<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:** [August 24, 2018, 11:52am UTC](https://discuss.elastic.co/t/logstash-is-keep-on-running/141880/3 "2018-08-24T11:52:53Z")

</div>

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