logstash安装

 
安装java
yum install java-1.6.0-openjdk* -y
安装elasticsearch
wget  https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz 
tar -zxvf elasticsearch-0.19.11.tar.gz
mv elasticsearch-0.19.11 /usr/local/elasticsearch
/usr/local/elasticsearch/bin/elasticsearch -f


安装插件elasticsearch-head:
yum install git -y
git clone git://github.com/Aconex/elasticsearch-head.git
/usr/local/elasticsearch/bin/plugin -install Aconex/elasticsearch-head
重启es
http://192.168.14.117:9200/_plugin/head/
测试:
wget  http://logstash.net/docs/1.1.0/tutorials/10-minute-walkthrough/apache-parse.conf
修改如下:
output {
  stdout {
    debug => true
  }
  elasticsearch { embedded => true }   //开启es支持
}

安装grok:
yum install -y gcc gperf make libevent-devel pcre-devel tokyocabinet-devel
wget --no-check-certificate  https://github.com/jordansissel/grok/tarball/master -O grok.tar.gz
tar zxf grok.tar.gz
cd jordansissel-grok-*
make grok
make install
ldconfig
cd ..
运行:

java -jar logstash-*-monolithic.jar agent -f apache-parse.conf  -- web --backend elasticsearch://localhost/

tail -f /var/log/httpd/access_log|nc 127.0.0.1 3333
转自:http://blog.chinaunix.net/uid-405749-id-3414824.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值