AKAI TSUKI

System development or Technical something

Install Logstash

インストール

www.elastic.co

のページを参考にlogstashをインストールします。

# java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
#
# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
# vi /etc/yum.repos.d/logstash.repo
# cat /etc/yum.repos.d/logstash.repo
[logstash-2.3]
name=Logstash repository for 2.3.x packages
baseurl=https://packages.elastic.co/logstash/2.3/centos
gpgcheck=1
gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1
# yum info logstash
# yum install logstash

動作確認

起動させて"hello world","test","hello world"を入力しています。

# bin/logstash -e 'input { stdin { } } output { stdout {} }'
hello world                                                  <- input
Settings: Default pipeline workers: 1
Pipeline main started
2016-05-08T05:51:38.816Z e0b8c7a1e2cb hello world
test                                                         <- input
2016-05-08T05:51:46.622Z e0b8c7a1e2cb test
hello world                                                  <- input
2016-05-08T05:51:56.310Z e0b8c7a1e2cb hello world

(参考)

www.elastic.co