ElasticSearch的状态查看
2017-11-29 14:36
387 查看
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?humanlogstash-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 |
支持原创
原文,公众号:clark_blog
博客:blog.csdn.net/clark_xu
代码:https://github.com/clark99
相关文章推荐
- Elasticsearch 快速查看集群状态、内存、磁盘使用情况
- elasticsearch 查看节点状态信息
- ElasticSearch5.6.1监控集群状态、查看集群信息的一般操作方法
- ElasticSearch集群状态查看命令大全
- elasticsearch集群的状态查看
- ElasticSearch集群状态查看命令大全
- Elasticsearch——使用_cat查看Elasticsearch状态
- git查看工作状态和历史提交
- Linux下查看SELinux状态和关闭SELinux的方法
- linux查看CPU性能及工作状态的指令mpstat,vmstat,iostat,sar,top
- 命令行查看Memcached运行状态
- centos防火墙开启、关闭、查看状态
- mysql 查看存储引擎的状态 show engine innodb status 详解
- dos命令查看端口状态
- 查看Oracle工作状态
- 命令行查看Memcached运行状态
- 查看 SELinux状态及关闭SELinu
- 找到长时间执行的oracle会话,查看其操作系统进程状态
- zabbix通过简单shell命令监控elasticsearch集群状态
- LINUX 下查看设备状态的常用命令