Logstash

From Omnia
Jump to navigation Jump to search

logstash

logstash - open source log management - http://logstash.net/

Install

Prerequisites:

  • Java runtime - The only prerequisite required by Logstash is a Java runtime.

Check Java version:

java -version

Extract package:

wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz
tar -zvxf logstash-1.4.2.tar.gz

Install elastic search:

curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.tar.gz
tar zxvf elasticsearch-1.1.1.tar.gz
cd elasticsearch-1.1.1/
./bin/elasticsearch

Start logstash with elastic search output:

bin/logstash -e 'input { stdin { } } output { elasticsearch { host => localhost } }'

Verify:

curl 'http://localhost:9200/_search?pretty'

Config:

input { stdin { } }
output {
  elasticsearch { host => localhost }
  stdout { codec => rubydebug }
}

Using config:

bin/logstash -f logstash-simple.conf

References: