• 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}
  • 相关阅读:
    Java变量相关
    centos 7安装Docker
    字符串匹配的KMP算法
    [转]关于”算法工程师/机器学习工程师”的笔试和面试总结
    希腊字母与拉丁字母的对应
    决策树和基于决策树的集成方法(DT,RF,GBDT,XGB)复习总结
    机器学习总结
    bat批处理的注释语句
    Python中使用pickle持久化对象
    怎样用通俗的语言解释REST,以及RESTful?
  • 原文地址:https://www.cnblogs.com/llq1214/p/11319826.html
Copyright © 2020-2023  润新知