Install logstash as a service easily (Ubuntu)


During my actual setup, I have to setup many instances of logstash, on different servers and each one with different configuration files. It’s very boring to set all this by hand, so I’ve looked for an init.d script of the net to handle that, and I’ve made a Perl script to automatize this install.

(For CentOS / Redhat, see this post)

What does this script
It takes the configuration filename as input, and writes the logstash service script, right into /etc/init.

How to use it
First of all, you must have a /opt/logstash/logstash.jar file (which can be a symbolic link to the real archive), and your configuration file must be in /etc/logstash/ (with a .conf extension).

And that’s it : you just have to run (as root) ./ <configName>

(For example if you configuration file is /etc/logstash/shipper.conf, then run ./ shipper)

The script is there : feel free to improve it and send me your comments and results :

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© Crocoware technical blog