zoukankan      html  css  js  c++  java
  • Elasticsearch 可视化管理工具

    ES和Solr是2个比较常见的搜索引擎,但是Solr有控制台页面,ES就没有自带的,下面就推荐2个毕竟使用的工具。

    ElasticHD

    ElasticHD 支持 ES监控实时搜索Index template快捷替换修改索引列表信息查看SQL converts to DSL工具等。是一款非常伴的 Dashboard。

    项目地址https://github.com/360EntSecGroup-Skylar/ElasticHD

    docker run -p 9200:9200 -d --name elasticsearch elasticsearch
    docker run -p 9800:9800 -d --link elasticsearch:demo containerize/elastichd

     添加测试的索引和数据

    [root@iZbp143t3oxhfc3ar7jey0Z ~]#  curl -XPUT 'localhost:9200/test'
    {"acknowledged":true,"shards_acknowledged":true,"index":"test"}[root@iZbp143t3oxhfc3ar7jey0Z ~]#
    [root@iZbp143t3oxhfc3ar7jey0Z ~]#
    [root@iZbp143t3oxhfc3ar7jey0Z ~]# curl -XPUT -H "Content-Type: application/json" 'localhost:9200/test/article/2?pretty' -d '
    > {
    >   "title": "test",
    >   "content":"testsfsdfdsfdsf",
    >   "PV":10
    > }'
    {
      "_index" : "test",
      "_type" : "article",
      "_id" : "2",
      "_version" : 1,
      "result" : "created",
      "_shards" : {
        "total" : 2,
        "successful" : 1,
        "failed" : 0
      },
      "created" : true
    }

    Dejavu

    Dejavu 也是一个 Elasticsearch的 Web UI 工具,其 UI界面更符合当下主流的前端页面风格,因此使用起来很方便。

    项目地址https://github.com/appbaseio/dejavu/

    Docker 安装

    [root@iZbp143t3oxhfc3ar7jey0Z ~]# docker run --name elasticsearch -p 9200:9200 -d elasticsearch -E http.port=9200 -E http.cors.allow-origin="http://localhost:1358" -E http.cors.enabled=true -E http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization -E http.cors.allow-credentials=true
    56cf057cc654646f985a522357310101db1875780941196246e27759d19f0513
    [root@iZbp143t3oxhfc3ar7jey0Z ~]# docker ps -l
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    56cf057cc654 elasticsearch "/docker-entrypoin..." 4 seconds ago Up 3 seconds 0.0.0.0:9200->9200/tcp, 9300/tcp elasticsearch

     注:我的es是5版本的,涉及到跨域的问题,要按照上面的方式启动ES.

    [root@hadoop002 ~]#  docker run -p 1358:1358 -d docker.io/appbaseio/dejavu:3.4.2
    58a345b44834e552aac591ad549e81728e76c69103b36c413ff98d04f5f61374
    [root@hadoop002 ~]# docker ps -l
    CONTAINER ID        IMAGE                              COMMAND                  CREATED             STATUS              PORTS                    NAMES
    58a345b44834        docker.io/appbaseio/dejavu:3.4.2   "/bin/sh -c 'node ..."   2 minutes ago       Up 36 seconds       0.0.0.0:1358->1358/tcp   serene_wozniak

     

  • 相关阅读:
    CSS3总结一:border(边框)
    浏览器控制台使用
    CSS3选择器
    jQuery实现搜索框插件+豆瓣音乐接口实现豆瓣搜索框
    服务器代理+jQuery.ajax实现图片瀑布流
    计算机网络之iframe内联框架跨域
    计算机网络之JSONP跨域
    程序集加载与反射(一):理论篇
    垃圾回收机制,是不是这样理解?
    异常处理机制
  • 原文地址:https://www.cnblogs.com/dalianpai/p/12347272.html
Copyright © 2011-2022 走看看