Stop logstash when finish import


#1

Hi guys,

I know this topic has already been answered but I wanted to know if with these new release is there any news about this?

If not, can anyone give an example of how to stop logstash with stdin or similar, automatically? I still didn't got it.

Thank you very much,
Afonso


(Magnus Bäck) #2

I know this topic has already been answered but I wanted to know if with these new release is there any news about this?

Presumably any such changes would be documented in the release notes.

If not, can anyone give an example of how to stop logstash with stdin or similar, automatically? I still didn't got it.

What part is unclear? When the stdin input has hit the end of the file senses that the other end of the pipe has closed it'll shut Logstash down.


#3

Thank you Magnus for the answer.

The thing is, where should I put stdin?

My config file is like this:

input {
file{
path => "D:\Users\afonso.ribeiro\Desktop\dados_enterprise.csv"
start_position => "beginning"
sincedb_path => "dev/null"
codec => plain { charset => "Windows-1252" }
}
}

Should I delete this? And put stdin reading the file?


(Magnus Bäck) #4

Yes, replace the file input with a stdin input and pipe the input file to the Logstash process.


#5

Ok. Thank you very much for the help.

I will try to find some example to base on.

Thanks very much again.

Best regards,
Afonso Ribeiro


(system) #6

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