Run logstash in batch mode + signals?


(Jason Brooks) #1

Hello,

I have learned how to do some data conversion with logstash. Eventually, I would like to piggyback tasks on to an existing logstash service, but for now I would like to run logstash on a configuration and exit when complete.

At the moment, I just use ^c to exit logstash when I am done.

OH hey, are there any signals I can send a logstash service to do things like reload configurations, reset file pointers, etc?

--jason


(Magnus Bäck) #2

I have learned how to do some data conversion with logstash. Eventually, I would like to piggyback tasks on to an existing logstash service, but for now I would like to run logstash on a configuration and exit when complete.

Logstash's file input is geared towards continuous monitoring of input files of unknown length so it doesn't know when it's done.

OH hey, are there any signals I can send a logstash service to do things like reload configurations, reset file pointers, etc?

You can configure it to automatically reload its configuration when it changes but I don't think SIGHUP etc work.

Not sure exactly what you mean by resetting file pointers but the answer is no.


(Simon Lundström) #3

Use the
stdin
plugin and feed logstash the files you want to convert. Logstash will
stop when stdin get's closed.

cat one or several files | logstash -f your_config

(Jason Brooks) #4

sweet, I will try the stdin method next time around!

--jason


(system) #5

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