Elasticsearch logstash kibane 搭建

下载 链接
1. Elasticsearch: wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.3/elasticsearch-2.3.3.tar.gz
2. Logtash:wget https://download.elastic.co/logstash/logstash/logstash-2.3.2.tar.gz
3. Kibana: wget https://download.elastic.co/kibana/kibana/kibana-4.5.1-linux-x64.tar.gz

安装 elasticsearch
	下载 elasticsearch2.3.3
	tar -zxf elasticsearch-2.3.3.tar.gz -C /usr/local/
	启动 /usr/local/elasticsearch-2.3.3/bin/elascticsearch
	elasticsearch 安装 kopf 插件
	./plugin install lmenezes/elasticsearch-kopf
	cd plugins 
	执行 ls 查看 是否有 kopf
	在浏览器访问 http://localhost:9200/_plugin/kopf 浏览保存在 Elasticsearch 中的数据
	
	安装 head 插件
	./plugin install mobz/elasticsearch-head
	(其他插件 自行安装 比如:ik)

安装 logstash
	下载 logstash
	wget https://download.elastic.co/logstash/logstash/logstash-2.3.2.tar.gz
	tar -zxf logstash-2.3.2.tar.gz -C /usr/local/
	Logstash 使用 input 和 output 定义收集日志时的输入和输出的相关配置,本例中 input 定义了一个叫 "stdin" 的 input , output 定义一个叫 "stdout" 的 output 。无论我们输入什么字符, Logstash 都会按照某种格式来返回我们输入的字符,其中 output 被定义为 "stdout" 并使用了 codec 参数来指定 logstash 输出格式。
	配置 logstash 到 elasticsearch 当中
	# vim logstash-es-simple.conf
	input { stdin { } }
	output {
	   elasticsearch {host => "localhost" }
	   stdout { codec=> rubydebug }
	}

	(前提 es 已经正确安装)
	/usr/local/logstash-2.3.2/bin/logstash agent -f logstash-es-simple.conf

	logstash -e 'input{stdin{}}output{stdout{codec=>rubydebug}}'

	输入 hello logstash 回车 结果:
	{
	    "message" => "hello logstash",
	    "@version" => "1",
	   "@timestamp" => "2015-07-15T18:12:00.450Z",
	         "host" => "noc.vfast.com"
	}

	// 使用 geoip 获取 ip 对应的所有信息
	filter {
	    geoip {
	        source => "message" // es 存储 IP 的字段
	    }
	}

	参考链接 http://udn.yyuap.com/doc/logstash-best-practice-cn/filter/geoip.html

安装 Kibana
	下载 kibana
	wget https://download.elastic.co/kibana/kibana/kibana-4.5.1-linux-x64.tar.gz

	tar -zxf kibana-4.5.1-linux-x64.tar.gz -C /usr/local/

	/usr/local/kibana-4.5.1-linux-x64/bin/kibana

	访问 localhost:5601


到此,说明你的 ELK 平台安装部署完成。

问题

	重启 kibane 报错 ] Error: listen EADDRINUSE 101.201.78.80:5601
    at Object.exports._errnoException (util.js:870:11)
    解决:尝试 使用 fuser -n tcp 5601
	kill -9  端口

参考链接 : https://my.oschina.net/u/218312/blog/682792
			http://www.tuicool.com/articles/QFvARfr
			http://www.tuicool.com/articles/BVBvEz
			http://stackoverflow.com/questions/29344547/kibana4-geo-map-error-not-showing-the-client-ip-field


未完 待续......

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值