Install Logstash on Linux or Mac OS X

Anton Lytvynov
2 min readMay 23, 2018

Logstash is a tool for managing events and logs.w

Download package

We need to download a distribution package. So go to the elastic site and choose logstash in products.

All products

Or simply follow this link Download logstash page

Manual Installation

Now we need to unarchive a tar.gz. So go to download folder and enter the command in terminal :

tar -xzvf /home/lytvynov/Téléchargements/logstash-6.2.4.tar.gz

Now we have unarchived logstash. To start a logstash and test it type :

cd logstash-6.2.4
bin/logstash -e “input { stdin { } } output { stdout {} }”

You should see something like that

If you don’t pass -e “…” option you’ll see the error message

Pipeline error

Logstash needs to know input/output formats and for this, it waits for pipeline file.

Simple pipeline

You can find more details about pipelines here. I leave a simple pipeline with input in JSON format and output on rubydebug just to give an idea how it works.

input {
stdin {
codec => json
}
}
output {
stdout {
codec => rubydebug
}
}

Add it to your logstash folder :

touch path_to_logstash/config/pipelines/pipeline.conf

To run logstash with this pipeline enter a command :

bin/logstash -f config/pipelines/pipeline.conf

Install Logstash with Homebrew on Mac OS X

Mac os x users should be familiar with Homebrew (brew). To install it run this command in terminal :

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Use brew command in terminal to install Logstash :

brew update
brew install logstash

To run Logstash :

logstash -e “input { stdin { } } output { stdout {} }”

Congratulations !

Now you can work with Logstash on your localhost !

Do you need help with web or mobile development? Feel free to contact me here.

P.S. I really appreciate your like or share 🙏.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Anton Lytvynov
Anton Lytvynov

Written by Anton Lytvynov

CEO & Founder of Lytvynov Production, Senior web developer, architect, cryptocurrencies trader, https://lytvynov-production.com

No responses yet

What are your thoughts?