目录:
下载并安装GPG key
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
添加yum仓库
vim /etc/yum.repos.d/logstash.repo
[logstash-2.1]
name=Logstash repository for 2.1.x packages
baseurl=http://packages.elastic.co/logstash/2.1/centos
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1
安装logstash
yum install -y logstash
查看安装文件目录:rpm -ql logstash
/opt/logstash/bin/logstash -e ‘input {stdin{}} output {stdout{}}‘
/opt/logstash/bin/logstash -e ‘input {stdin{}} output {stdout{ codec => rubydebug }}‘
/opt/logstash/bin/logstash -e ‘input {stdin{}} output {elasticsearch{ hosts => ["192.168.213.200:9200"] }}‘
查看es:
可以配置多个输出:/opt/logstash/bin/logstash -e ‘input {stdin{}} output {elasticsearch{ hosts => ["192.168.213.200:9200"] } stdout{ codec => rubydebug }}‘
3、
---
原文:https://www.cnblogs.com/xy-ouyang/p/14408812.html