Add a -d daemon flag to logstash


To properly start logstash as a service (in Linux at least) , it really needs to be able to daemonize once it has initialized.

As it is now all init.d scripts out the just starts logstash in the background and we have no idea if it actually started or not.

It should work like this

  1. java -jar logstash.jar --daemon
    ... runs in foreground until all inputs etc are up and running... then
    ... goes into background

  2. echo "Joy!"


Jordan Sissel
February 7, 2014, 1:08 AM

What qualifies "running" ? Are you aware of the --configtest flag, and does that help?

Martin Wickman
February 7, 2014, 7:11 AM

Logstash could be considered started when all inputs and plugins have been initialized.

--configtest is new, I found no docs. Is that just a syntax check?

I'm currently solving particular problem using a expect script + a custom input-plugin that print some text when it is initialized.


Logstash Developers


Martin Wickman

Affects versions