User Tools

Site Tools


technical_notes:public:logstash-getting-started

Parent

Logstash - Getting started

These notes are relative to getting started with logstash.

Prerequisite: Java

Check if java is available :

java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.2) (7u65-2.5.2-3~14.04)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

If you have to install java :

sudo apt-get update
sudo apt-get install default-jre

Install logstash

curl -O https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz
tar zxvf logstash-1.4.2.tar.gz
cd logstash-1.4.2

Play with it

./logstash -e 'input { stdin { } } output { stdout { codec => rubydebug } }'

Write on console :

Hello

You will get the output

{
       "message" => "hello",
      "@version" => "1",
    "@timestamp" => "2014-09-23T12:45:46.067Z",
          "host" => "vagrant-ubuntu-trusty-64"
}
technical_notes/public/logstash-getting-started.txt · Last modified: 2014/09/23 14:48 by Fabien Arcellier