http://es.xiaoleilu.com/
希望自己有时间能参与一起翻译~学习了近一个月的elasticsearch,是时候做个总结了。
The Elastic Stack |Make Sense of Your Data
产品
Elasticsearch 分布式、开源的搜索和分析引擎。为垂直扩展、可靠性、易管理而生。它结合了搜索速度快的优点和支持复杂分析的需求。为开发者提供了对结构化的、非结构化的、时间序列的数据的友好查询语言(DSL)
Elasticsearch as a Service 在短时间内就可以搭建自己的ES集群。一个高度管理的解决方案,支持搜索,日志和分析。并且集成了很多商业的插件。
Logstash 是一个灵活的,开源的数据收集、数据enrichment、数据传输的管道。能够轻松地集成到常见的infrustructure里去。为充分地处理日志、时间、非结构化数据而设计,并能将数据分发到多种多样的输出,包括ES。
Shield 给企业级的ES带来安全保障,为整个ELK栈提供加密的通信,认证,基于角色的连接控制和审计。为日益增长的商业安全需要而生。sheild能为你带来头脑的平静。
Kibana 开源数据可视化平台,能够让你与数据交互,生成dashboads等图能让你宣传并分享你对数据的深刻见解。
Watcher 是一个警告和通知的产品。如果你能查询ES,你就能警告它。为ES提供安全的监控或者日志里的异常。watcher能让你基于你的数据马上采取行动。
Elasticsearch for Apache Hadoop es-hadoop是双向的连接器,让你实时地读写数据并且搜索。es-hadoop是一个优美的解决方案,利用了hadoop和ES两个的力量。
Marvel 提供了ES部署后状态的信息的综合的工具。监控ES节点的活动,快速诊断问题,并且能尽可能够提供性能的优化。
Beats 是ES开源数据传输的未来。从网络包到日志文件,infrastructure数据,还有更多。beats是一个构建了多种多样轻量的传输工具来帮助你利用操作的数据。
Language Clients 有ruby,python,php,perl,.NET,java和javascript.
***这么多产品我还只用了ES了,虽然官网说上去都很诱人的样子,但是用上去可能会有意想不到的坑。虽然一群牛逼的程序员做的东西质量可以肯定,但是小白还是要老老实实先一步一步来,不能说什么信什么。保持学习的好奇心,先给自己挖了一个又一个坑。
1. 安装
安装Elasticsearch唯一的要求是安装官方新版的Java。环境:win7 java 1.8_65 终端:cygwin64
可以从 elasticsearch.org/download 下载最新版本的Elasticsearch。解压。直接在命令行里进入bin目录,输入elasticsearch.bat便启动服务。
启动后访问localhost:9200便可看见欢迎界面。
{ "name" : "Lacuna", "cluster_name" : "elasticsearch", "version" : { "number" : "2.1.1", "build_hash" : "40e2c53a6b6c2972b3d13846e450e66f4375bd71", "build_timestamp" : "2015-12-15T13:05:55Z", "build_snapshot" : false, "lucene_version" : "5.3.1" }, "tagline" : "You Know, for Search" }
拷贝一下,给文件夹重命名,启动第二个ES节点~cluster_name相同会让两个节点自动成为一个集群。
安装head插件:elasticsearch/bin plugin install mobz/elasticsearch-head
效果图:

解压,将config/kibana.yml配置指向ES实例
安装kibana:
下载kibana https://www.elastic.co/downloads/kibana
运行 bin/kibana.bat
访问 http://yourhost.com:5601

安装marvel:When you initially install Marvel, a 30 day trial license is installed that allows access to all features. At the end of the trial period, you can purchase a subscription to keep using the full functionality of Marvel along with Shield and Watcher. To continue using Marvel’s key monitoring features for free, you can register for a Basic license.

需要重启一下kibana才能访问localhost:5601/app/marvel
Step 1: Install Marvel into Elasticsearch: | bin/plugin install license bin/plugin install marvel-agent
|
Step 2: Install Marvel into Kibana |
bin/kibana plugin --install elasticsearch/marvel/latest
|
Step 3: Start Elasticsearch and Kibana |
bin/elasticsearch bin/kibana
|
Step 4: Navigate to |

需要重启一下kibana才能访问localhost:5601/app/marvel

安装logstash:
https://www.elastic.co/downloads/logstash
直接下载解压就行。具体用法待研究。
测试安装:
cd logstash-{logstash_version}
bin/logstash -e 'input { stdin { } } output { stdout {} }'
网上看业界很多用ELK来实现大数据的日志监控、搜索与分析。
安装Sense:
https://github.com/bleskes/sense
binkibana plugin --install elastic/sense
访问:http://localhost:5601/app/sense
界面:
安装sheid:
Step 1: Install Shield | bin/plugin install elasticsearch/license/latest bin/plugin install elasticsearch/shield/latest
|
Step 2: Start Elasticsearch |
bin/elasticsearch
|
Step 3: Add an admin user |
bin/shield/esusers useradd es_admin -r admin
|
Step 4: Try it out — no user |
curl -XGET 'http://localhost:9200/'
|
Step 5: And with a user |
curl -u es_admin -XGET 'http://localhost:9200/' |
watcher和beats先不需要安装~
后来发现shield安装后,从节点连主节点也需要认证很麻烦,先卸载了。