对于Kibana ,我们知道,是Elasticsearch/Logstash/Kibana的必不可少成员。
前提:
第一步:上传
注意,对于,多节点的ELK集群安装在一个节点就好。我这里以主节点,HadoopMaster。
[hadoop@HadoopMaster app]$ pwd/home/hadoop/app[hadoop@HadoopMaster app]$ lltotal 3096drwxrwxr-x. 9 hadoop hadoop 4096 Feb 22 06:05 elasticsearch-2.4.3-rw-r--r--. 1 hadoop hadoop 908862 Jan 10 11:38 elasticsearch-head-master.zip-rw-r--r--. 1 hadoop hadoop 2228252 Jan 10 11:38 elasticsearch-kopf-master.zipdrwxr-xr-x. 10 hadoop hadoop 4096 Oct 31 17:15 hadoop-2.6.0drwxr-xr-x. 15 hadoop hadoop 4096 Nov 14 2014 hadoop-2.6.0-srcdrwxrwxr-x. 8 hadoop hadoop 4096 Nov 2 18:20 hbase-1.2.3drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79drwxrwxr-x. 9 hadoop hadoop 4096 Feb 25 19:18 tomcat-7.0.73drwxr-xr-x. 10 hadoop hadoop 4096 Nov 1 23:39 zookeeper-3.4.6[hadoop@HadoopMaster app]$ rz[hadoop@HadoopMaster app]$ lltotal 36432drwxrwxr-x. 9 hadoop hadoop 4096 Feb 22 06:05 elasticsearch-2.4.3-rw-r--r--. 1 hadoop hadoop 908862 Jan 10 11:38 elasticsearch-head-master.zip-rw-r--r--. 1 hadoop hadoop 2228252 Jan 10 11:38 elasticsearch-kopf-master.zipdrwxr-xr-x. 10 hadoop hadoop 4096 Oct 31 17:15 hadoop-2.6.0drwxr-xr-x. 15 hadoop hadoop 4096 Nov 14 2014 hadoop-2.6.0-srcdrwxrwxr-x. 8 hadoop hadoop 4096 Nov 2 18:20 hbase-1.2.3drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79-rw-r--r--. 1 hadoop hadoop 34135857 Mar 24 23:34 kibana-4.6.3-linux-x86_64.tar.gzdrwxrwxr-x. 9 hadoop hadoop 4096 Feb 25 19:18 tomcat-7.0.73drwxr-xr-x. 10 hadoop hadoop 4096 Nov 1 23:39 zookeeper-3.4.6[hadoop@HadoopMaster app]$
第二步:解压
[hadoop@HadoopMaster app]$ tar -zxvf kibana-4.6.3-linux-x86_64.tar.gz
第三步:删除安装包,并修改所属组和用户
[hadoop@HadoopMaster app]$ lltotal 36436drwxrwxr-x. 9 hadoop hadoop 4096 Feb 22 06:05 elasticsearch-2.4.3-rw-r--r--. 1 hadoop hadoop 908862 Jan 10 11:38 elasticsearch-head-master.zip-rw-r--r--. 1 hadoop hadoop 2228252 Jan 10 11:38 elasticsearch-kopf-master.zipdrwxr-xr-x. 10 hadoop hadoop 4096 Oct 31 17:15 hadoop-2.6.0drwxr-xr-x. 15 hadoop hadoop 4096 Nov 14 2014 hadoop-2.6.0-srcdrwxrwxr-x. 8 hadoop hadoop 4096 Nov 2 18:20 hbase-1.2.3drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79drwxrwxr-x. 11 hadoop hadoop 4096 Nov 4 23:24 kibana-4.6.3-linux-x86_64-rw-r--r--. 1 hadoop hadoop 34135857 Mar 24 23:34 kibana-4.6.3-linux-x86_64.tar.gzdrwxrwxr-x. 9 hadoop hadoop 4096 Feb 25 19:18 tomcat-7.0.73drwxr-xr-x. 10 hadoop hadoop 4096 Nov 1 23:39 zookeeper-3.4.6[hadoop@HadoopMaster app]$ rm kibana-4.6.3-linux-x86_64.tar.gz [hadoop@HadoopMaster app]$ lltotal 3100drwxrwxr-x. 9 hadoop hadoop 4096 Feb 22 06:05 elasticsearch-2.4.3-rw-r--r--. 1 hadoop hadoop 908862 Jan 10 11:38 elasticsearch-head-master.zip-rw-r--r--. 1 hadoop hadoop 2228252 Jan 10 11:38 elasticsearch-kopf-master.zipdrwxr-xr-x. 10 hadoop hadoop 4096 Oct 31 17:15 hadoop-2.6.0drwxr-xr-x. 15 hadoop hadoop 4096 Nov 14 2014 hadoop-2.6.0-srcdrwxrwxr-x. 8 hadoop hadoop 4096 Nov 2 18:20 hbase-1.2.3drwxr-xr-x. 8 hadoop hadoop 4096 Apr 11 2015 jdk1.7.0_79drwxrwxr-x. 11 hadoop hadoop 4096 Nov 4 23:24 kibana-4.6.3-linux-x86_64drwxrwxr-x. 9 hadoop hadoop 4096 Feb 25 19:18 tomcat-7.0.73drwxr-xr-x. 10 hadoop hadoop 4096 Nov 1 23:39 zookeeper-3.4.6[hadoop@HadoopMaster app]$
第四步:认识目录结构并,修改kibana.yml配置文件
[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ pwd/home/hadoop/app/kibana-4.6.3-linux-x86_64[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ lltotal 48drwxrwxr-x. 2 hadoop hadoop 4096 Nov 4 23:24 bindrwxrwxr-x. 2 hadoop hadoop 4096 Nov 4 23:24 configdrwxrwxr-x. 2 hadoop hadoop 4096 Nov 4 23:24 datadrwxrwxr-x. 2 hadoop hadoop 4096 Nov 4 23:24 installedPlugins-rw-rw-r--. 1 hadoop hadoop 562 Nov 4 23:24 LICENSE.txtdrwxrwxr-x. 6 hadoop hadoop 4096 Nov 4 23:24 nodedrwxrwxr-x. 83 hadoop hadoop 4096 Nov 4 23:24 node_modulesdrwxrwxr-x. 3 hadoop hadoop 4096 Nov 4 23:24 optimize-rw-rw-r--. 1 hadoop hadoop 701 Nov 4 23:24 package.json-rw-rw-r--. 1 hadoop hadoop 2322 Nov 4 23:24 README.txtdrwxrwxr-x. 8 hadoop hadoop 4096 Nov 4 23:24 srcdrwxrwxr-x. 2 hadoop hadoop 4096 Nov 4 23:24 webpackShims[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ cd config/[hadoop@HadoopMaster config]$ lltotal 4-rw-rw-r--. 1 hadoop hadoop 3200 Nov 4 23:24 kibana.yml[hadoop@HadoopMaster config]$ vim kibana.yml
更多,请见
很多其实,我们不需改,只是Kibana需要与ElasticSearch结合,需要更改如下地方:
最后得到,
server.host: "192.168.80.10" server.port: 5601 elasticsearch.url: "http://192.168.80.10:9200" kibana.index: ".kibana" 对于server.host,最好别0.0.0.0,不安全。不建议
第五步:在Kibana里,安装marvel插件
[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ bin/kibana plugin --install elasticsearch/marvel/latest
在这里,需要一段较长时间,如果在线安装不了的话,就选择离线方式来安装吧。
在这一步,我遇到了如下问题。
具体怎么做,请见
的问题九。
说明的是,每次最新稳定版本,是变化的。所以若用离线来安装的话,则先复制那个网址下载就好。
查看Kibana里是否安装marverl插件成功!
[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ pwd/home/hadoop/app/kibana-4.6.3-linux-x86_64[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ lltotal 48drwxrwxr-x. 2 hadoop hadoop 4096 Nov 4 23:24 bindrwxrwxr-x. 2 hadoop hadoop 4096 Mar 25 07:55 configdrwxrwxr-x. 2 hadoop hadoop 4096 Nov 4 23:24 datadrwxrwxr-x. 3 hadoop hadoop 4096 Mar 25 18:49 installedPlugins-rw-rw-r--. 1 hadoop hadoop 562 Nov 4 23:24 LICENSE.txtdrwxrwxr-x. 6 hadoop hadoop 4096 Nov 4 23:24 nodedrwxrwxr-x. 83 hadoop hadoop 4096 Nov 4 23:24 node_modulesdrwxrwxr-x. 3 hadoop hadoop 4096 Nov 4 23:24 optimize-rw-rw-r--. 1 hadoop hadoop 701 Nov 4 23:24 package.json-rw-rw-r--. 1 hadoop hadoop 2322 Nov 4 23:24 README.txtdrwxrwxr-x. 8 hadoop hadoop 4096 Nov 4 23:24 srcdrwxrwxr-x. 2 hadoop hadoop 4096 Nov 4 23:24 webpackShims[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ cd installedPlugins/[hadoop@HadoopMaster installedPlugins]$ lltotal 4drwxrwxr-x. 6 hadoop hadoop 4096 Mar 25 18:49 marvel[hadoop@HadoopMaster installedPlugins]$ cd marvel/[hadoop@HadoopMaster marvel]$ lltotal 88-rw-rw-r--. 1 hadoop hadoop 2366 Dec 21 10:26 index.js-rw-rw-r--. 1 hadoop hadoop 43681 Dec 21 10:26 LICENSE.txtdrwxrwxr-x. 486 hadoop hadoop 20480 Mar 25 18:48 node_modules-rw-rw-r--. 1 hadoop hadoop 150 Dec 21 10:26 NOTICE.txt-rw-rw-r--. 1 hadoop hadoop 1410 Jan 6 07:41 package.jsondrwxrwxr-x. 8 hadoop hadoop 4096 Mar 25 18:48 publicdrwxrwxr-x. 4 hadoop hadoop 4096 Mar 25 18:48 serverdrwxrwxr-x. 2 hadoop hadoop 4096 Mar 25 18:48 webpackShims[hadoop@HadoopMaster marvel]$
第六步:启动Kibana
在启动之前,先启动Elasticsearch,请移步
[hadoop@HadoopMaster elasticsearch-2.4.3]$ pwd/home/hadoop/app/elasticsearch-2.4.3[hadoop@HadoopMaster elasticsearch-2.4.3]$ jps2083 Jps[hadoop@HadoopMaster elasticsearch-2.4.3]$ bin/elasticsearch -d[hadoop@HadoopMaster elasticsearch-2.4.3]$ jps2117 Jps2104 Elasticsearch[hadoop@HadoopMaster elasticsearch-2.4.3]$
其实啊,或者通过es的这种后台来启动也是可以的。
这里,我们可以使用bin/elasticsearch -help来查知怎么使用。
bin/elasticsearch -d -p /home/hadoop/data/elasticsearch-2.4.3/pid
[hadoop@HadoopSlave1 elasticsearch-2.4.3]$ jps1900 Jps[hadoop@HadoopSlave1 elasticsearch-2.4.3]$ bin/elasticsearch -d[hadoop@HadoopSlave1 elasticsearch-2.4.3]$ jps1991 Jps1921 Elasticsearch[hadoop@HadoopSlave1 elasticsearch-2.4.3]$
其实啊,或者通过es的这种后台来启动也是可以的。
这里,我们可以使用bin/elasticsearch -help来查知怎么使用。
bin/elasticsearch -d -p /home/hadoop/data/elasticsearch-2.4.3/pid
[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ pwd/home/hadoop/app/elasticsearch-2.4.3[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ jps1908 Jps[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ bin/elasticsearch -d[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ jps1929 Elasticsearch1997 Jps[hadoop@HadoopSlave2 elasticsearch-2.4.3]$
其实啊,或者通过es的这种后台来启动也是可以的。
这里,我们可以使用bin/elasticsearch -help来查知怎么使用。
bin/elasticsearch -d -p /home/hadoop/data/elasticsearch-2.4.3/pid
Kibana 启动
1.前台启动
bin/kibana
2.后台启动
nohup /home/ybxiang/kibana/kibana-4.5.1-linux-x64/bin/kibana & exit
为了更好的演示给大家,我这另开一窗口,来特意启动Kibana进程。
注意:
启动kibana时一直卡在[listening] Server running at http://0.0.0.0:5601,界面打开什么都没有,出现
No Marvel Data Found (marvel error)?
[error][status][plugin:elasticsearch@1.0.0] Status changed from red to red - Service Unavailable?
[error][status][plugin:elasticsearch@1.0.0] Status changed from red to red - Elasticsearch is still initializing the kibana index.
解决办法,请移步
的问题十。
然后,得到:
更详细的,一般在Kibana里安装插件marverl,之后的浏览界面,如下:
因为之前啊,我们搭建过Logstash,所以。可以直接用了。这里很简单,不多赘述。
继续更新!