Elasticsearch + Logstash + Kibana 搭建教程
# ELK:Elasticsearch + Logstash + Kibana 搭建教程
Shipper:日志收集者。负责监控本地日志文件的变化,及时把日志文件的最新内容收集起来,输出到Redis暂存。
Indexer:日志存储者。负责从Redis接收日志,写入到本地文件。
Broker:日志Hub,用来连接多个Shipper和多个Indexer。
无论是Shipper还是Indexer,Logstash始终只做前面提到的3件事:
Shipper从日志文件读取最新的行文本,经过处理(这里我们会改写部分元数据),输出到Redis,
Indexer从Redis读取文本,经过处理(这里我们会format文本),输出到文件。
一个Logstash进程可以有多个输入源,所以一个Logstash进程可以同时读取一台服务器上的多个日志文件。Redis是Logstash官方推荐的Broker角色“人选”,支持订阅发布和队列两种数据传输模式,推荐使用。输入输出支持过滤,改写。Logstash支持多种输出源,可以配置多个输出实现数据的多份复制,也可以输出到Email,File,Tcp,或者作为其它程序的输入,又或者安装插件实现和其他系统的对接,比如搜索引擎Elasticsearch。
http://blog.csdn.net/jamesge2010/article/details/51498483
http://kibana.logstash.es/content/logstash/plugins/input/file.html
centeros 下搭建:
参考:http://www.cnblogs.com/tianjixiaoying/p/4316011.html
sh elasticsearch start 作为服务启动时:
WARNING: Elasticsearch may have failed to start.
尝试直接用elasticsearch命令启动:在/usr/local/elk/elasticsearch/bin下:输命令:./elasticsearch 仍然报异常:
Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details. 发现elasticsearch不能用root账户启动
参见:http://www.open-open.com/lib/view/open1451451639167.html 新建账户:useradd *** parsswd *** 切换到非root账户登录启动,仍然报异常:http://www.cnblogs.com/krockey/p/5850141.html 安装:elasticsearch-head报错
b.2 ./bin/plugin -install mobz/elasticsearch-head
提示错误,错误信息是:ERROR: unknown command [-install]. Use [-h] option to list available commands,这是因为Elasticsearch在2.0以上的版本将-install变成了install。
b.3 故而执行命令 ./bin/plugin install mobz/elasticsearch-head即可。
查看yum默认安装路径:
rpm -ql 软件名称
elasticsearch 外网访问9200端口访问:
修改elasticsearch-2.3.3\config\elasticsearch.yml文件 ,重启elasticsearch服务即可

echo 'marvel.agent.enabled: false' >> ./config/elasticsearch.yml
指定是否进行监控,执行上面语句直接把配置加入elasticsearch.yml
导入测试数据:把测试数据放入到/elasticsearch/data 下,首先cd 到data目录下,执行命令:curl -XPUT http://localhost:9200/_bulk --data-binary @logs.json./plugin install license./plugin install marvel-agent
./plugin install elasticsearch/marvel/latest marvel插件只对开发环境免费,尝试安装后,浏览器访问:http://localhost:9200/_plugin/marvel,页面为空白?
logstash安装配置:http://www.cnblogs.com/yjf512/p/4194012.html
编辑文件config/kibana.yml ,配置属性:
- server.host (站点地址)
- elasticsearch.url (指向Elasticsearch 实例)
集群配置:
无论怎么配置都是报异常: failed to validate incoming join request from node 是因为注节点中安装了marvel 解决方案:http://stackoverflow.com/questions/37451247/elasticsearch-cluster-cant-join-new-node 参考资料: http://www.centoscn.com/image-text/install/2015/1105/6386.html
(1)elaticsearch 没有作为服务运行
(2)配置logstash
Elasticsearch + Logstash + Kibana 搭建教程的更多相关文章
- 键盘侠Linux干货| ELK(Elasticsearch + Logstash + Kibana) 搭建教程
前言 Elasticsearch + Logstash + Kibana(ELK)是一套开源的日志管理方案,分析网站的访问情况时我们一般会借助 Google / 百度 / CNZZ 等方式嵌入 JS ...
- ELK日志系统:Elasticsearch + Logstash + Kibana 搭建教程
环境:OS X 10.10.5 + JDK 1.8 步骤: 一.下载ELK的三大组件 Elasticsearch下载地址: https://www.elastic.co/downloads/elast ...
- ELK日志系统:Elasticsearch + Logstash + Kibana 搭建教程(转)
环境:OS X 10.10.5 + JDK 1.8 步骤: 一.下载ELK的三大组件 Elasticsearch下载地址: https://www.elastic.co/downloads/elast ...
- ELK日志系统:Elasticsearch + Logstash + Kibana 搭建教程 good
环境:OS X 10.10.5 + JDK 1.8 步骤: 一.下载ELK的三大组件 Elasticsearch下载地址: https://www.elastic.co/downloads/elast ...
- 用ElasticSearch,LogStash,Kibana搭建实时日志收集系统
用ElasticSearch,LogStash,Kibana搭建实时日志收集系统 介绍 这套系统,logstash负责收集处理日志文件内容存储到elasticsearch搜索引擎数据库中.kibana ...
- ELK6.0部署:Elasticsearch+Logstash+Kibana搭建分布式日志平台
一.前言 1.ELK简介 ELK是Elasticsearch+Logstash+Kibana的简称 ElasticSearch是一个基于Lucene的分布式全文搜索引擎,提供 RESTful API进 ...
- Elasticsearch+Logstash+Kibana搭建分布式日志平台
一.前言 编译安装 1.ELK简介 下载相关安装包地址:https://www.elastic.co/cn/downloads ELK是Elasticsearch+Logstash+Kibana的简称 ...
- 【转】ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台
[转自]https://my.oschina.net/itblog/blog/547250 摘要: 前段时间研究的Log4j+Kafka中,有人建议把Kafka收集到的日志存放于ES(ElasticS ...
- 【Big Data - ELK】ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台
摘要: 前段时间研究的Log4j+Kafka中,有人建议把Kafka收集到的日志存放于ES(ElasticSearch,一款基于Apache Lucene的开源分布式搜索引擎)中便于查找和分析,在研究 ...
随机推荐
- 使用Vim比较两个文件的内容
原文地址:http://blog.chinaunix.net/uid-22548820-id-3477464.html 1. 使用vim的比较模式打开两个文件: vim -d file1 file2 ...
- How to Mount a USB Drive in Ubuntu
Read more : http://www.ehow.com/how_6762235_mount-usb-drive-ubuntu.html Most USB drives will automou ...
- css查缺补漏2
15.布局流程 一.确定页面的版心; 二.确定页面中的行模块,以及每个页面中的列模块 三.制作HTML结构 例:.top+.banner+(.main>.left+.right)+.footer ...
- POJ 3268 Silver Cow Party 最短路
原题链接:http://poj.org/problem?id=3268 Silver Cow Party Time Limit: 2000MS Memory Limit: 65536K Total ...
- 多核服务器的JVM优化选项(转载)
原文链接 现在多核CPU是主流.利用多核技术,可以有效发挥硬件的能力,提升吞吐量,对于Java程序,可以实现并发垃圾收集.但是Java利用多核技术也带来了一些问题,主要是多线程共享内存引起了.目前内存 ...
- MySQL的1067错误
1.打开my.ini文件,找到default-storage-engine=InnoDB这一行,把它改成default-storage-engine=MyISAM.*** my.ini必须为ansi格 ...
- [Bash] Understand and Use Functions in Bash
n this lesson, we'll go over how bash functions work. Bash functions work like mini bash scripts--yo ...
- sql的一些知识_高级
1.视图 http://www.cnblogs.com/wang666/p/7885934.html 2.存储过程 http://www.cnblogs.com/wang666/p/7920748.h ...
- MKVToolNix v8.7.0
功能强大的MKV封装格式视频文件制作和编辑工具,支持音轨.字幕的封装,高清发烧友必备工具. 百度云:http://pan.baidu.com/s/1eQWPnxS password:ll64 360 ...
- FFmpeg for ios架构:中级
FFmpeg这部分想了非常久,也没找到比較好的解说方式.本来想像其他博客一样.对着代码一行行的分析.但后来感觉不太现实,FFmpeg应用在IOS上怎么说代码最少也有个5.6k行(包含音视频.业务逻辑) ...