ELK日志应用平台搭建

ELK架构:

ElasticSearch:用于存储、索引日志.
Logstash:用于收集、处理和转发事件或日志信息的工具.
Kibana:搜索和可视化的日志的WEB界面.

ELK优点:
a.处理方式灵活:ElasticSearch是实时全文索引.
b.配置简单易上手.
c.检索性能高效:虽然每次计算都是实时计算的,但是优秀的设计基本可以达到全天数据查询的秒级响应.
d.集群线性扩展:ElasticSearch和Logstash集群都是可以线性扩展的.
e.前端操作绚丽:Kibana界面上,只需要点击鼠标,就可以完成搜索、聚合功能,生成绚丽的仪表板.

0.安装前准备:
ElasticSearch和Logstash需要java环境,需要安装JDK1.7以上的版本.
a.下载JDK的rpm包
b.安装
c.Java -version :检测安装的JDK

1.安装Elasticsearch
a.wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/rpm/elasticsearch/2.3.5/elasticsearch-2.3.5.rpm
b.rpm -ivh elasticsearch-2.3.5.rpm
c.mkdir /opt/develop/elasticsearch/data -p
mkdir /opt/develop/elasticsearch/log -p
d.# vi /usr/share/elasticsearch/config/elasticsearch.yml
Cluster.name:my-application
Node.name:node-1
Path.data=/opt/develop/elasticsearch/data
Path.log=/opt/develop/elasticsearch/log
Network.host=xxx.xxx.xx.xx
http.port:9200
node.max_local_storage_nodes: 1
e.ElasticSearch需要使用非root用户启动服务
Groupadd ela
Useradd ela -g ela -p xxx
Su – ela
执行安装路径下的/elasticsearch启动服务
f.curl -X GET http://localhost:9200/ 查看ElasticSearch的安装信息----启动成功
g.chkconfig –add elasticsearch

2.安装kibana
a.wget https://download.elastic.co/kibana/kibana/kibana-4.5.4-1.x86_64.rpm
b.安装
c.vi /opt/kibana/config/kibana.yml
server.port:5601
server.host:’0.0.0.0’
elasticsearch.url:’http://xxx.xxx.xx.xx:9200’
d.service kibana start
e.chkconfig –add kibana
f.访问网页:http://localhost:5601

3.安装Logstash 2.3.4
a.wget https://download.elastic.co/logstash/logstash/packages/centos/logstash-2.3.4-1.noarch.rpm
b.安装
c.启动服务
d.测试:cd /opt/logstash/bin
./logstash -e ‘input { stdin {} } output { stdout {} }’

【参考文档:】
1.https://www.elastic.co/guide/index.html
2.http://www.ttlsa.com/elk/howto-install-elasticsearch-logstash-and-kibana-elk-stack/

3.https://www.elastic.co/guide/en/logstash/current/plugins-inputs-log4j.html

4.http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=21142030&id=5671032

  1. http://www.22pq.com/read/10969.html

6.http://517sou.net/archives/centos%E4%B8%8B%E4%BD%BF%E7%94%A8elk%E5%A5%97%E4%BB%B6%E6%90%AD%E5%BB%BA%E6%97%A5%E5%BF%97%E5%88%86%E6%9E%90%E5%92%8C%E7%9B%91%E6%8E%A7%E5%B9%B3%E5%8F%B0/


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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值