win7下搭建ELK

 

 

1 、安装elasticsearch:安装教程(某度随意一篇,按照流程操作即可)

2 安装logstash

2.1 解压logstash

2.2 config目录下创建文件http.conf

# 定义日志来源
input {
  http {
    host => "localhost"
    port => 8087
  }
}

filter {
    # http 过滤非/hello前缀的url,  且请求传入 message为空时 则删除该信息
    if ([headers][request_path] !~ '^\/procedure\/exception' or [message] == "") {
        drop {}
    }
}

output{
  elasticsearch {
    action => "index"
    hosts => "localhost:9200"
  }
  stdout{codec => rubydebug}
}

# 定义日志来源 input { http { host => "localhost" port => 8087 } } filter { # http 过滤非/hello前缀的url, 且请求传入 message为空时 则删除该信息 if ([headers][request_path] !~ '^\/procedure\/exception' or [message] == "") { drop {} } } output{ elasticsearch { action => "index" hosts => "localhost:9200" } stdout{codec => rubydebug} }

2.3 bin目录下执行:logstash.bat -f ../config/http.conf

此时遇到错误:1、启动logstash报错: 找不到或无法加载主类 Files\Java\jdk1.8.0_172\lib\dt.jar;,解决方法:参考https://blog.csdn.net/DENAN0108/article/details/82590434

2、启动logstash报错:找不到或无法加载主类 Files\Java\jdk1.8.0_161\lib;G:"Program ...\logstash-6.2.2\logstash-core\lib\jars\guava-22.0.jar";:解决办法:将logstash目录去除空格。

2.4 浏览器访问 http://localhost:9600/ 

3 安装kibana 
最简单,本地跑的话用默认配置就好了。 
双击bin目录下的kibina.bat

浏览器访问 http://localhost:5601/app/kibana

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值