Elasticsearch 监控插件安装(elasticsearch-head与Kibana)
摘要
安装Elasticsearch插件Head与Kibana
版本
elasticsearch版本: elasticsearch-2.3.4
elasticsearch-head版本: 2.x(支持elasticsearch 2.x)
Kibana版本: 4.5(支持elasticsearch 2.3 later)
内容
ElasticSearch-Head
关于ElasticSearch-Head官方介绍比较简单,只有一句话:
ElasticSearch-Head 是一个与Elastic集群(Cluster)相交互的Web前台。
ES-Head的主要作用
- 它展现ES集群的拓扑结构,并且可以通过它来进行索引(Index)和节点(Node)级别的操作
- 它提供一组针对集群的查询API,并将结果以json和表格形式返回
- 它提供一些快捷菜单,用以展现集群的各种状态
安装
-
在线安装
针对ElasticSearch,我们可以直接通过命令行进行在线插件安装
⇒ sudo elasticsearch/bin/plugin install mobz/elasticsearch-head
但是可能会出现SSLHandshakeException错误
参考https://github.com/mobz/elasticsearch-head/issues/190给出的解决方法。
例如:
bin/plugin --install knapsack --url file:///Full/Path/To/elasticsearch-knapsack-2.1.2.zip
-
手动安装
先到github下载文件 elasticsearch-head-master.zip
然后通过指定文件路径来安装
⇒ sudo ./plugin install file:///Users/Richard/Downloads/elasticsearch-head-master.zip
在2.x之前版本的命令行格式为:
bin/plugin --install head --url file:///Full/Path/To/elasticsearch-head-master.zip
Kibana
Kibana 是一个ElasticSearch的管理工具,它也提供了对ES集群操作的API。
The repositories set up in this procedure are not compatible with distributions using version 3 of rpm
, such as CentOS version 5.
-
Download and install the public signing key:
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
-
Create a file named
kibana.repo
in the/etc/yum.repos.d/
directory with the following contents:[kibana-4.5] name=Kibana repository for 4.5.x packages baseurl=http://packages.elastic.co/kibana/4.5/centos gpgcheck=1 gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch enabled=1
-
Install Kibana by running the following command:
yum install kibana
Configure Kibana to automatically start during bootup. If your distribution is using the System V version of
init
(check withps -p 1
), run the following command:chkconfig --add kibana
-
If your distribution is using
systemd
, run the following commands instead:sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable kibana.service
That’s it! Kibana is now running on port 5601.
-
Install and Start Kibana local
To get Kibana up and running:
- Download the Kibana 4 binary package for your platform.
- Extract the
.zip
ortar.gz
archive file. - Run Kibana from the install directory:
bin/kibana
(Linux/MacOSX) orbin\kibana.bat
(Windows).
On Unix, you can instead run the package manager suited for your distribution.
关于如何配置,请参考:
http://kibana.logstash.es/content/kibana/v4/setup.html
参考:
elasticsearch-head:
https://github.com/mobz/elasticsearch-head
http://mobz.github.io/elasticsearch-head/
ElasticSearch 2 (6) - 插件安装Head、Kopf与Bigdesk
Kibana: