Elasticsearch学习--elasticsearch-head插件安装

1.简介

elasticsearch-head是一个界面化的集群操作和管理工具,可以对集群进行傻瓜式操作。你可以通过插件把它集成到es(首选方式),也可以安装成一个独立webapp。

es-head主要有三个方面的操作:

  1. 显示集群的拓扑,并且能够执行索引和节点级别操作
  2. 搜索接口能够查询集群中原始json或表格格式的检索数据
  3. 能够快速访问并显示集群的状态
  4. 有一个输入窗口,允许任意调用RESTful API。这个接口包含几个选项,可以组合在一起以产生有趣的结果; 
      1. 请求方法(get、put、post、delete),查询json数据,节点和路径 
      2. 支持JSON验证器 
      3. 支持重复请求计时器 
      4. 支持使用javascript表达式变换结果 
      5. 收集结果的能力随着时间的推移(使用定时器),或比较的结果 
      6. 能力图表转换后的结果在一个简单的条形图(包括时间序列)

官方的文档: 
GitHub - mobz/elasticsearch-head: A web front end for an elastic search cluster

2.安装

第一种安装方式

  1. 我们只介绍插件的安装方式,另外的方式大家看官方文档即可。ES-head作为插件,有两个安装方式:

通过elasticseach自带的plugin命令 
如下图:

D:\elasticsearch\elasticsearch-6.2.0\bin>elasticsearch-plugin install elasticsearch-head
A tool for managing installed elasticsearch plugins

Commands
--------
list - Lists installed elasticsearch plugins
install - Install a plugin
remove - removes a plugin from Elasticsearch

Non-option arguments:
command

Option         Description
------         -----------
-h, --help     show help
-s, --silent   show minimal output
-v, --verbose  show verbose output
ERROR: Unknown plugin elasticsearch-head

以前使用命令

elasticsearch/bin/plugin -install mobz/elasticsearch-head 
  • 1

但是6.X版本,改成elasticsearch-plugin了,具体看下图

这里写图片描述

但是没有安装成功。说没有这个包(未解决)

第2种安装方式

    第二种方式就是不通过Elasticsearch插件方式进行安装

    1、下载elasticsearch-head的源码包

    地址:https://github.com/mobz/elasticsearch-head/releases

  2、安装node运行环境

    地址:https://nodejs.org/en/download/

    3、安装完node之后编译elasticsearch-head

    执行npm install -g grunt-cli 编译源码

    执行npm install 安装服务

    执行grunt server启动服务

    

    启动服务之后访问Node Exporter

        
    4、接下来还需要修改elasticsearch相关配置

        修改 elasticsearch/config/elasticsearch.yml

        添加

http.cors.enabled: true
http.cors.allow-origin: "*"

    接下来在浏览器访问Node Exporter

    

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值