ElasticSearch的状态查看

1.1    基本状态查看
集群状态

get _cluster/health

get _cluster/state

get _cluster/settings

get _cluster/pending_tasks

 

注:

get _cluster/health查看分片状态

get _cluster/state查看nodes,metadata, indices信息

节点状态

get _cat/nodes?v

#查看ip|heap.percent|ram.percent |load_1m|load_5m|load_15m |node.role |master |name

get _nodes

get _nodes/stats

#这两条命令相同

#主要角色

"roles": [

        "master",

        "data",

        "ingest"

      ],

 

get _nodes/hot_threads

get _nodes/node-1/hot_threads

 

::: {node-1}{BxHQfpeBRPq4CLOk61bOIQ}{-EzwOWxpTwyoekXMsssNIw}{192.168.11.73}{192.168.11.73:9300}

Hot threads at 2017-11-16T05:14:55.330Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:

   10.3% (51.3ms out of 500ms) cpu usage by thread 'elasticsearch[node-1][bulk][T#2]'

     9/10 snapshots sharing following 2 elements

    3.5% (17.5ms out of 500ms) cpu usage by thread 'elasticsearch[node-1][refresh][T#1]'

     10/10 snapshots sharing following 2 elements

 

 

 

索引状态

GET _cat/indices?v

GET _all?pretty

GET _all/_stats

#健康状态

GET _cluster/health?pretty&level=indices

查看单个索引状态

get risklog-2017.11.10/_stats

get risklog-2017.11.10/_count

#查看mapping逻辑结构

get risklog-2017.11.10/_mapping

#查看物理结构

get risklog-2017.11.10/_search_shards

get risklog-2017.11.10/_segments

 

 

分片状态

GET _cat/shards?help

GET_cat/shards?v&h=index,shard,state,docs,store,ip,unassigned.reason,unassigned.details

 

1.2巡检脚本
健康状态

GET _cluster/health

GET _cluster/health?level=indices

GET _cluster/health?level=shards

GET _cluster/health?wait_for_status=green

 

磁盘空间容量

GET _cat/allocation?help

GET _cat/allocation?v

1.3分片恢复
1.3.1 待验证
logstash-2017.08.03/_recovery?human

logstash-2017.08.03/_recovery?human&pretty

logstash-2017.08.03/_stats?pretty

logstash-2017.08.03/_shard_stores?pretty

logstash-2017.08.03/_shard_stores?status=green&pretty

 

官网原话: 1、Allocate an unassigned shard to a node. Accepts the index and shardfor index name and shard number, and node to allocate the shard to. It alsoaccepts allow_primary flag to explicitly specify that it is allowed toexplicitly allocate a primary shard (might result in data loss).

2、Warning:Theallow_primary parameter will force a new empty primary shard to beallocatedwithout any data. If a node which has a copy of the original shard(including data) rejoins the cluster later on, that data will be deleted: theold shard copy will be replaced by the new live shard copy.

1.4 CAT api
GET _cat

GET /_cat/indices?help

GET _cat/indices?v&bytes=gb?v
 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值