Stop Logstash when it has finished to read a csv file


#1

Hi everybody,

I'm using Logstash 1.5.3 and its input "file" in order to index a csv file to Elasticsearch. I want to execute logstash and when it has finished to read my file I want to properly stop Logstash. How can I do that?

Thanks in advance for your help.


Stuck at "Successfully started Logstash API endpoint {:port=>9600}"
Delete file after read
(Magnus B├Ąck) #2

Logstash's file input has no concept of "done" so it can't shut down Logstash when it's done. The StackOverflow answer below lists a couple of options.


#3

Thank you for your answer, I have already read this post and I wanted to know if it was possible to properly stop Logstash when it had finished to read one csv file.

I think it would be a great idea to offer this option in a future release, it would be an option as "process_once" => true or false.


(system) #4