zoukankan      html  css  js  c++  java
  • ES 部分API

    查看集群的健康状态
    curl -XGET http://192.168.1.93:9200/_cat/health?v
    
    查询所有的节点
    curl -XGET http://192.168.1.93:9200/_cat/nodes?v
    
    查询所有的索引
    curl -XGET http://192.168.1.93:9200/_cat/indices?v
    
    统计es索引信息下的文档数量
    curl -XGET 'http://192.168.1.93:9200/_cat/count'

    统计某个索引信息下的文档数量
    curl -XGET 'http://192.168.1.93:9200/_cat/count/api-core-2015.12.31'
    
    查看某一类索引
    curl -XGET 'http://192.168.1.93:9200/_cat/indices/api-core-*?pretty'
    
    查看某个索引的健康状态
    curl -s http://192.168.1.93:9200/_cat/indices/IndexName?h=status
    
    查看所有关闭的索引
    curl -XGET http://192.168.1.93:9200/_cat/indices | awk '$1=="close"'
    
    
    
    打开某个关闭的索引
    curl -X POST "192.168.1.93:9200/api-core-2019.08.16/_open?pretty"
    
    删除某个索引
    curl -XDELETE 'http://192.168.1.93:9200/api-core-2019.08.11'
    
    删除某类索引
    curl -XDELETE 'http://192.168.1.93:9200/api-core-*'
    查看某个索引的健康状态

    查看所有关闭的索引

    打开某个关闭的索引

    查看某一类索引

    查看集群的健康状态

    每个命令都支持使用?v参数,来显示详细的信息

    /_cat/allocation
    /_cat/shards
    /_cat/shards/{index}
    /_cat/master
    /_cat/nodes
    /_cat/indices
    /_cat/indices/{index}
    /_cat/segments
    /_cat/segments/{index}
    /_cat/count
    /_cat/count/{index}
    /_cat/recovery
    /_cat/recovery/{index}
    /_cat/health
    /_cat/pending_tasks
    /_cat/aliases
    /_cat/aliases/{alias}
    /_cat/thread_pool
    /_cat/plugins
    /_cat/fielddata
    /_cat/fielddata/{fields}
    /_cat/nodeattrs
    /_cat/repositories
    /_cat/snapshots/{repository}
  • 相关阅读:
    17款最佳的代码审查工具
    最全的开发人员在线速查手册
    Expression Blend 4 激活码
    TimeSpan XML序列化
    如何使用策略模式
    .Net 笔记(二) 泛型和集合
    VS2010 旗舰版序列号
    WPF ArrangeOverride与MeasureOverride
    实现zbar扫描二维码的时候就把照片存储出来的办法
    用Jpush极光推送实现抓取特定某个用户Log到七牛云服务器
  • 原文地址:https://www.cnblogs.com/llq1214/p/11319826.html
Copyright © 2011-2022 走看看