zoukankan      html  css  js  c++  java
  • ELK常用命令

    1、查询当前所有的索引

    #curl 'localhost:9200/_cat/indices?v'

    2、查看集群健康状态

    #curl 'localhost:9200/_cat/health?v'

    绿色表示一切正常, 黄色表示所有的数据可用但是部分副本还没有分配,红色表示部分数据因为某些原因不可用

    3、产看node情况

    #curl 'localhost:9200/_cat/nodes?v'

    4、创建索引

    #curl -XPUT 'localhost:9200/customer?pretty'

    5、删除某个索引

    #curl -XDELETE 'localhost:9200/customer?pretty'

    删除多个索引

    #curl -XDELETE 'localhost:9200/customer-*?pretty'

    #curl -XDELETE 'localhost:9200/customer,customer2?pretty'

    6、索引的增删改查有一个类似的格式,总结如下:

      curl -X<REST Verb> <Node>:<Port>/<Index>/<Type>/<ID>

      <REST Verb>:REST风格的语法谓词

      <Node>:节点ip

      <port>:节点端口号,默认9200

      <Index>:索引名

      <Type>:索引类型

      <ID>:操作对象的ID号

  • 相关阅读:
    [Luogu]小Z的AK计划
    [POI2006]OKR-Periods of Words
    [NOI2014]动物园
    [NOI2009]管道取珠
    [IOI2005]河流
    [国家集训队]Crash的文明世界
    [HDU5382]GCD?LCM!
    [AGC027E]ABBreviate
    [CF]Round510
    [NOIp2005]篝火晚会
  • 原文地址:https://www.cnblogs.com/cuishuai/p/8116638.html
Copyright © 2011-2022 走看看