软件准备:
logstash-2.1.0.zip
elasticsearch-2.1.0.zip
kibana-4.3.0-windows.zip
Redis-x64-2.8.2104.msi
下载地址:http://pan.baidu.com/s/1jHyw9Qe
安装软件
1、安装Redis,根据向导直接安装
2、解压logstash-2.1.0.zip到两个目录:logstash logstashagent
3、解压kibana-4.3.0-windows.zip 到目录:kibana,同时修改bin目录下脚本:
4、elasticsearch-2.1.0.zip 解压到目录:elasticsearch
解压后的目录结构如下:
准备相关脚本:
1、启动服务脚本start.bat
此脚本用于启动:es kibana Logstash server
其中logsrash-server.conf内容如下:
input{
redis{
host=>"127.0.0.1"
key=>"logstash"
data_type=>"list"
}
}
output{
elasticsearch {
hosts=>"127.0.0.1:9200"
}
}
2、logstash agent启动脚本startagent.bat,内容如下:
其中logsrash-agent.conf内容如下:
完成以上配置后,就可以启动批处理命令
设置kibana,打开http://localhost:5601/
数据分析:
参考:
https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html
https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html
https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html
https://www.elastic.co/guide/en/logstash/current/plugins-codecs-multiline.html
http://www.cnblogs.com/vovlie/p/4227027.html
http://www.cnblogs.com/shantu/p/4598875.html
http://www.cnblogs.com/yxwkf/p/4753778.html