下载logstash
tar –xf logstash
mv logstash /opt/
ln -s /opt/logstash-1.4.2 /usr/local/logstash
测试logstash
bin/logstash-e 'input { stdin { } }output { stdout {} }'
配置logstash
创建配置文件目录:
mkdir-p /opt/logstash/etc
vim/opt/logstash/etc/hello_search.conf
输入下面:
input { stdin { type => "human" } }
output { stdout { codec => rubydebug }
elasticsearch { host => "192.168.33.10" port => 9200 } }
|
启动:
/bin/logstash-f hello_search.conf