How to configure logstash-forwarder and make it working on AWS linux instances?

  • Posted on February 10, 2015
  • shailAsked by shail

i have configured ELK effectively on AWS linux. however, i am not able to get logstash-forwarder working and getting below error while starting the logstash-forwarder service on client servers which are Amazon linux.

“/etc/init.d/logstash-forwarder: line 25: /lib/init/ No such file or directory”

can anyone help me on this.

also suggest how i can check and confirm the functioning of my ELK server.

Thanks in advance.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I wrote this init script for RedHat/CentOS: There’s also a bunch of example init scripts, for various distributions, taken from James Turnbull’s excellent Logstash book:

Note that the init script was removed from the logstash-forwarder Github repo in February. This link is to the last version of the init script

Without knowing more about how you installed logstash-forwarder, it’s hard to give a good answer to your question. You can grab and install the init script in the GitHub repo using:

cd /etc/init.d/; sudo wget -O logstash-forwarder
sudo chmod +x logstash-forwarder
sudo update-rc.d logstash-forwarder defaults

This assumes your logstash-forwarder binary is installed to /opt/logstash-forwarder/bin/logstash-forwarder Edit the DAEMON variable as needed if that’s not the case.

Checkout this tutorial for all the information on setting up an ELK server on Ubuntu: