1.curl 'localhost:9200/_cat/health?v'
绿色,最健康的状态,代表所有的分片包括备份都可用。黄色,基本的分片可用,但是备份不可用(也可能是没有备份)。红色,部分的分片可用,表明分片有一部分损坏。此时执行查询部分数据仍然可以查到,遇到这种情况,还是赶快解决比较好。
epoch | seconds since 1970-01-01 00:00:00
timestamp | time in HH:MM:SS
cluster | cluster name 集群名称
status | health status
node.total | total number of nodes 节点总数
node.data | number of nodes that can store data 可以存储数据的节点数量
shards | total number of shards 碎片总数
pri | number of primary shards 主要碎片数
relo | number of relocating nodes 重定位节点数
init |number of initializing nodes 初始化节点数
unassign | number of unassigned shards 未分配碎片的数量
pending_tasks | number of pending tasks 待处理任务的数量
max_task_wait_time | wait time of longest task pending 最长任务等待时间
active_shards_percent | active number of shards in percent 以百分比表示的有效碎片数
2.curl localhost:9200/_cat/allocation
该指令提供一个快照,反映当前节点有多少个分片(shard)以及用了多少磁盘空间(disk)
shards | number of shards on node 节点碎片
disk.indices | disk used by ES indices es 使用磁盘量
disk.used | disk used (total, not just ES) 磁盘使用总量
disk.avail | disk available 磁盘可用
disk.total | total capacity of all volumes 所有卷的总容量
disk.percent | percent disk used 磁盘使用百分比
host | host of node 节点主机
ip | ip of node 节点IP
node | name of node 节点名称
3.curl localhost:9200/_cat/shards?v
curl localhost:9200/_cat/shards
curl localhost:9200/_cat/shards/{index}-----指定某个index
index | index name 索引名称
shard | shard name 碎片名称
prirep | primary or replica 主要或者复制品
state | shard state 碎片状态
docs | number of docs in shard 碎片上的文档数
store | store size of shard (how much disk it uses) 碎片的存储大小 (它使用多少磁盘)
ip | ip of node where it lives 其所在节点的ip id | unique id of node where it lives 其所在节点的唯一id
node | name of node where it lives 所在节点的名称
sync_id | sync id 同步标识
unassigned.reason | reason shard is unassigned 碎片未分配的原因
unassigned.at | time shard became unassigned (UTC) 时间碎片变为未分配(UTC)
unassigned.for | time has been unassigned 时间未分配
unassigned.details | additional details as to why the shard became unassigned 关于碎片为何未分配的其他细节
recoverysource.type | recovery source type 恢复源类型
completion.size | size of completion 完工规模
fielddata.memory_size | used fielddata cache 使用过的字段数据缓存
fielddata.evictions | fielddata evictions field data evictions
query_cache.memory_size | used query cache used query cache
query_cache.evictions | query cache evictions 查询缓存删除
flush.total | number of flushes 冲洗次数
flush.total_time | time spent in flush 冲水时间
get.current | number of current get ops 当前获取操作数
get.time | time spent in get 花费在获取上的时间
get.total | number of get ops 获得操作次数
get.exists_time | time spent in successful gets 成功获得花费的时间
get.exists_total | number of successful gets 成功获得的次数
get.missing_time | time spent in failed gets 失败获得的时间
get.missing_total | number of failed gets 失败的次数
indexing.delete_current | number of current deletions 当前删除的次数
indexing.delete_time | time spent in deletions 花费在删除上的时间
indexing.delete_total | number of delete ops 删除操作的次数
indexing.index_current | number of current indexing ops 当前索引操作数
indexing.index_time | time spent in indexing 用于索引的时间
indexing.index_total | number of indexing ops 索引操作数
indexing.index_failed | number of failed indexing ops 索引操作失败次数
merges.current | number of current merges 当前合并数
merges.current_docs | number of current merging docs 当前合并文档的数量
merges.current_size | size of current merges 当前合并的规模
merges.total | number of completed merge ops 完成的合并操作数
merges.total_docs | docs merged 文档合并
merges.total_size | size merged 尺寸合并
merges.total_time | time spent in merges 在合并中花费的时间
refresh.total | total refreshes 总刷新量
refresh.time | time spent in refreshes 刷新时间
refresh.listeners | number of pending refresh listeners 等待刷新监听器的次数
search.fetch_current | current fetch phase ops 当前阶段操作系统
search.fetch_time | time spent in fetch phase 获取当前阶段花费时间
search.fetch_total | total fetch ops 获取操作系统数
search.open_contexts | open search contexts 开放搜索上下文
search.query_current | current query phase ops 当前查询阶段
search.query_time | time spent in query phase 在查询阶段花费的时间
search.query_total | total query phase ops 总查询阶段
search.scroll_current | open scroll contexts 打开/当前滚动上下文
search.scroll_time | time scroll contexts held open 打开/滚动上下文时间
search.scroll_total | completed scroll contexts 已完成的滚动上下文
segments.count | number of segments 段数
segments.memory | memory used by segments 分段使用的内存
segments.index_writer_memory | memory used by index writer 索引编写器使用的内存
segments.version_map_memory | memory used by version map 版本映射使用的内存
segments.fixed_bitset_memory | memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields 用于 固定嵌套对象字段类型的内存,以及用于父字段中引用的类型的类型过滤器
seq_no.max | max sequence number 最大序列号
seq_no.local_checkpoint | local checkpoint 本地检查点
seq_no.global_checkpoint | global checkpoint 全局检查点
warmer.current | current warmer ops 当前温热装置系统
warmer.total | total warmer ops 全温热装置系统
warmer.total_time | time spent in warmers 在正常温度的时间
4、curl localhost:9200/_cat/master
9mdr1TYTSRuPyFHIZI-fWw 172.17.0.2 172.17.0.2 9mdr1TY
详述:
id | | node id 节点id
host | h | host name 主机名
ip | | ip address ip地址
node | n | node name 节点名称
5、curl localhost:9200/_cat/nodes
172.17.0.2 36 94 0 0.12 0.04 0.01 mdi * 9mdr1TY
id | id,nodeId | unique node id 唯一节点id
pid | p | process id 进程id标示
ip | i | ip address ip地址
port | po | bound transport port 装运港
http_address | http | bound http address 绑定http地址
version | v | es version es版本
flavor | f | es distribution flavor es分布特点
type | t | es distribution type es分布类型
build | b | es build hash ES构建哈希
jdk | j | jdk version jdk版本
disk.total | dt,diskTotal | total disk space 总磁盘空间
disk.used | du,diskUsed | used disk space 使用的硬盘空间
disk.avail | d,da,disk,diskAvail | available disk space 可用磁盘空间
disk.used_percent | dup,diskUsedPercent | used disk space percentage 使用磁盘空间百分比
heap.current | hc,heapCurrent | used heap 使用堆
heap.percent | hp,heapPercent | used heap ratio 使用堆比率
heap.max | hm,heapMax | max configured heap 最大配置堆
ram.current | rc,ramCurrent | used machine memory 使用机器占用内存
ram.percent | rp,ramPercent | used machine memory ratio 使用过的机器存储器比率
ram.max | rm,ramMax | total machine memory 总机器存储器内存
file_desc.current | fdc,fileDescriptorCurrent | used file descriptors used file descriptors
file_desc.percent | fdp,fileDescriptorPercent | used file descriptor ratio used file descriptor ratio
file_desc.max | fdm,fileDescriptorMax | max file descriptors max file descriptors
cpu | cpu | recent cpu usage 最近cpu的使用
load_1m | l | 1m load avg 1m负载AVG
load_5m | l | 5m load avg 5m负载AVG
load_15m | l | 15m load avg 15m负载AVG
uptime | u | node uptime 节点正常运行时间
node.role | r,role,nodeRole | m:master eligible node, d:data node, i:ingest node, -:coordinating node only m:主合格节点,d:data节点,i:i摄取节点,-:协调节点
master | m | *:current master
name | n | node name
completion.size | cs,completionSize | size of completion
fielddata.memory_size | fm,fielddataMemory | used fielddata cache 使用过的字段数据缓存
fielddata.evictions | fe,fielddataEvictions | fielddata evictions 删除的文件数据
query_cache.memory_size | qcm,queryCacheMemory | used query cache 使用的查询缓存
query_cache.evictions | qce,queryCacheEvictions | query cache evictions 删除的查询缓存
request_cache.memory_size | rcm,requestCacheMemory | used request cache 使用请求缓存
request_cache.evictions | rce,requestCacheEvictions | request cache evictions 请求缓存删除
request_cache.hit_count | rchc,requestCacheHitCount | request cache hit counts 请求缓存命中计数
request_cache.miss_count | rcmc,requestCacheMissCount | request cache miss counts 请求缓存未命中计数
flush.total | ft,flushTotal | number of flushes 冲洗次数
flush.total_time | ftt,flushTotalTime | time spent in flush
get.current | gc,getCurrent | number of current get ops
get.time | gti,getTime | time spent in get
get.total | gto,getTotal | number of get ops
get.exists_time | geti,getExistsTime | time spent in successful gets
get.exists_total | geto,getExistsTotal | number of successful gets
get.missing_time | gmti,getMissingTime | time spent in failed gets
get.missing_total | gmto,getMissingTotal | number of failed gets
indexing.delete_current | idc,indexingDeleteCurrent | number of current deletions
indexing.delete_time | idti,indexingDeleteTime | time spent in deletions
indexing.delete_total | idto,indexingDeleteTotal | number of delete ops
indexing.index_current | iic,indexingIndexCurrent | number of current indexing ops
indexing.index_time | iiti,indexingIndexTime | time spent in indexing
indexing.index_total | iito,indexingIndexTotal | number of indexing ops
indexing.index_failed | iif,indexingIndexFailed | number of failed indexing ops
merges.current | mc,mergesCurrent | number of current merges
merges.current_docs | mcd,mergesCurrentDocs | number of current merging docs
merges.current_size | mcs,mergesCurrentSize | size of current merges
merges.total | mt,mergesTotal | number of completed merge ops
merges.total_docs | mtd,mergesTotalDocs | docs merged
merges.total_size | mts,mergesTotalSize | size merged
merges.total_time | mtt,mergesTotalTime | time spent in merges
refresh.total | rto,refreshTotal | total refreshes
refresh.time | rti,refreshTime | time spent in refreshes
refresh.listeners | rli,refreshListeners | number of pending refresh listeners
script.compilations | scrcc,scriptCompilations | script compilations 脚本编译
script.cache_evictions | scrce,scriptCacheEvictions | script cache evictions 脚本缓存删除
search.fetch_current | sfc,searchFetchCurrent | current fetch phase ops
search.fetch_time | sfti,searchFetchTime | time spent in fetch phase
search.fetch_total | sfto,searchFetchTotal | total fetch ops
search.open_contexts | so,searchOpenContexts | open search contexts
search.query_current | sqc,searchQueryCurrent | current query phase ops
search.query_time | sqti,searchQueryTime | time spent in query phase
search.query_total | sqto,searchQueryTotal | total query phase ops
search.scroll_current | scc,searchScrollCurrent | open scroll contexts
search.scroll_time | scti,searchScrollTime | time scroll contexts held open
search.scroll_total | scto,searchScrollTotal | completed scroll contexts
segments.count | sc,segmentsCount | number of segments
segments.memory | sm,segmentsMemory | memory used by segments
segments.index_writer_memory | siwm,segmentsIndexWriterMemory | memory used by index writer
segments.version_map_memory | svmm,segmentsVersionMapMemory | memory used by version map
segments.fixed_bitset_memory | sfbm,fixedBitsetMemory | memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields
suggest.current | suc,suggestCurrent | number of current suggest ops
suggest.time | suti,suggestTime | time spend in suggest
suggest.total | suto,suggestTotal | number of suggest ops
6、
curl localhost:9200/_cat/indices
yellow open people DxbxNYWIQVOZDkesc5latg 3 1 0 0 783b 783b
curl localhost:9200/_cat/indices/?help
health | current health status 健康状态
status | open/close status 打开/关闭 状态
index | i,idx | index name 索引名称
uuid | id,uuid | index uuid 索引uuid
pri | p,shards.primary,shardsPrimary | number of primary shards 主要碎片数
rep | r,shards.replica,shardsReplica | number of replica shards 复制碎片数
docs.count | dc,docsCount | available docs 可用文档
docs.deleted | dd,docsDeleted | deleted docs 删除文档
creation.date | cd | index creation date (millisecond value) 索引创建时间 (毫秒值)
creation.date.string | cds | index creation date (as string) 索引创建时间 (字符串)
store.size | ss,storeSize | store size of primaries & replicas 主要储存量和复制的
pri.store.size | | store size of primaries 主要储存量
completion.size | cs,completionSize | size of completion 完工规模
pri.completion.size | | size of completion 主要完工规模
fielddata.memory_size | fm,fielddataMemory | used fielddata cache 使用过的字段数据缓存
pri.fielddata.memory_size | | used fielddata cache 主要使用的字段数据缓存
fielddata.evictions | fe,fielddataEvictions | fielddata evictions 删除的字段数据
pri.fielddata.evictions | | fielddata evictions 主要删除的字段数据
query_cache.memory_size | qcm,queryCacheMemory | used query cache 使用的查询缓存
pri.query_cache.memory_size | | used query cache 主要的查询缓存大小
query_cache.evictions | qce,queryCacheEvictions | query cache evictions 删除的查询缓存
pri.query_cache.evictions | | query cache evictions 主要的查询缓存删除
request_cache.memory_size | rcm,requestCacheMemory | used request cache 使用请求缓存
pri.request_cache.memory_size | | used request cache 主要的使用中的请求缓存
request_cache.evictions | rce,requestCacheEvictions | request cache evictions 删除的请求缓存
pri.request_cache.evictions | | request cache evictions 主要删除的请求缓存
request_cache.hit_count | rchc,requestCacheHitCount | request cache hit count 请求缓存命中次数
pri.request_cache.hit_count | | request cache hit count 主要的请求缓存命中次数
request_cache.miss_count | rcmc,requestCacheMissCount | request cache miss count 请求未击中缓存数
pri.request_cache.miss_count | | request cache miss count 主要的未击中缓存数
flush.total | ft,flushTotal | number of flushes 冲洗次数
pri.flush.total | | number of flushes 主要冲洗次数
flush.total_time | ftt,flushTotalTime | time spent in flush 冲洗时间
pri.flush.total_time | | time spent in flush 主要冲洗时间
get.current | gc,getCurrent | number of current get ops 当前获取到ops次数
pri.get.current | | number of current get ops 主要活到到ops次数
get.time | gti,getTime | time spent in get 获取时间
pri.get.time | | time spent in get 主要获取时间
get.total | gto,getTotal | number of get ops 获取到ops数
pri.get.total | | number of get ops 主要获取到ops数
get.exists_time | geti,getExistsTime | time spent in successful gets 成功获取到时间
pri.get.exists_time | | time spent in successful gets 主要成功获取到的时间
get.exists_total | geto,getExistsTotal | number of successful gets 成功获取到到数量
pri.get.exists_total | | number of successful gets 主要成功获取到的数量
get.missing_time | gmti,getMissingTime | time spent in failed gets 获取失败的时间
pri.get.missing_time | | time spent in failed gets 主要获取失败的时间
get.missing_total | gmto,getMissingTotal | number of failed gets 获取失败的次数
pri.get.missing_total | | number of failed gets 主要获取失败的次数
indexing.delete_current | idc,indexingDeleteCurrent | number of current deletions 当前删除的次数
pri.indexing.delete_current | | number of current deletions 主要的当前删除的次数
indexing.delete_time | idti,indexingDeleteTime | time spent in deletions 索引删除的时间
pri.indexing.delete_time | | time spent in deletions 主要的索引删除的时间
indexing.delete_total | idto,indexingDeleteTotal | number of delete ops 删除的索引的数量
pri.indexing.delete_total | | number of delete ops 主要的索引删除的数量
indexing.index_current | iic,indexingIndexCurrent | number of current indexing ops 当前索引操作数量
pri.indexing.index_current | | number of current indexing ops 主要的索引操作数
indexing.index_time | iiti,indexingIndexTime | time spent in indexing 用于索引操作的时间
pri.indexing.index_time | | time spent in indexing 用于索引操作的主要时间
indexing.index_total | iito,indexingIndexTotal | number of indexing ops 索引操作的总数
pri.indexing.index_total | | number of indexing ops 主要的索引操作数
indexing.index_failed | iif,indexingIndexFailed | number of failed indexing ops 失败的索引数
pri.indexing.index_failed | | number of failed indexing ops 主要的索引操作数
merges.current | mc,mergesCurrent | number of current merges 当前合并数
pri.merges.current | | number of current merges 当前主要合并数
merges.current_docs | mcd,mergesCurrentDocs | number of current merging docs 当前合并文档数
pri.merges.current_docs | | number of current merging docs 当前主要合并文档数
merges.current_size | mcs,mergesCurrentSize | size of current merges 当前合并的规模
pri.merges.current_size | | size of current merges 当前主要合并的规模
merges.total | mt,mergesTotal | number of completed merge ops 完成的合并操作数
pri.merges.total | | number of completed merge ops 主要的完成合并操作数
merges.total_docs | mtd,mergesTotalDocs | docs merged 文档合并总数
pri.merges.total_docs | | docs merged 文档主要合并总数
merges.total_size | mts,mergesTotalSize | size merged 合并总长度
pri.merges.total_size | | size merged 主要合并的长度
merges.total_time | mtt,mergesTotalTime | time spent in merges 合并需要的时间
pri.merges.total_time | | time spent in merges 主要合并需要的时间
refresh.total | rto,refreshTotal | total refreshes 刷新总数
pri.refresh.total | | total refreshes 主要刷新总数
refresh.time | rti,refreshTime | time spent in refreshes 刷新时间
pri.refresh.time | | time spent in refreshes 主要 刷新时间
refresh.listeners | rli,refreshListeners | number of pending refresh listeners 等待刷新监听器的数量
pri.refresh.listeners | | number of pending refresh listeners 等待刷新主要监听器的数量
search.fetch_current | sfc,searchFetchCurrent | current fetch phase ops 当前到达阶段操作
pri.search.fetch_current | | current fetch phase ops 当前主要到达阶段操作
search.fetch_time | sfti,searchFetchTime | time spent in fetch phase 取指令花费时间
pri.search.fetch_time | | time spent in fetch phase 取指令花费主要时间
search.fetch_total | sfto,searchFetchTotal | total fetch ops 取指令总数
pri.search.fetch_total | | total fetch ops 主要取指令数
search.open_contexts | so,searchOpenContexts | open search contexts 打开搜索上下文
pri.search.open_contexts | | open search contexts 打开主要搜索上下文
search.query_current | sqc,searchQueryCurrent | current query phase ops 当前查询指令操作
pri.search.query_current | | current query phase ops 当前主要查询指令操作
search.query_time | sqti,searchQueryTime | time spent in query phase 查询指令消费时间
pri.search.query_time | | time spent in query phase 查询指令主要消费时间
search.query_total | sqto,searchQueryTotal | total query phase ops 查询操作总数
pri.search.query_total | | total query phase ops 主要查询操作总数
search.scroll_current | scc,searchScrollCurrent | open scroll contexts 打开滚动搜索上下文
pri.search.scroll_current | | open scroll contexts 打开主要滚动搜索上下文
search.scroll_time | scti,searchScrollTime | time scroll contexts held open 打开滚动上下文 时间
pri.search.scroll_time | | time scroll contexts held open 打开主要滚动上下文 时间
search.scroll_total | scto,searchScrollTotal | completed scroll contexts 已完成的滚动上下文
pri.search.scroll_total | | completed scroll contexts 已完成的主要滚动上下文
segments.count | sc,segmentsCount | number of segments 分片总数
pri.segments.count | | number of segments 主要分片总数
segments.memory | sm,segmentsMemory | memory used by segments 使用分片的内存
pri.segments.memory | | memory used by segments 主要使用分片的内存
segments.index_writer_memory | siwm,segmentsIndexWriterMemory | memory used by index writer 索引编辑使用的内存
pri.segments.index_writer_memory | | memory used by index writer 主要索引编辑使用的内存
segments.version_map_memory | svmm,segmentsVersionMapMemory | memory used by version map 版本hash占用内存
pri.segments.version_map_memory | | memory used by version map 版本hash占用主要内存
segments.fixed_bitset_memory | sfbm,fixedBitsetMemory | memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields 用于固定嵌套对象字段类型的内存,以及用于父字段中引用的类型的类型过滤器
pri.segments.fixed_bitset_memory | | memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields 主要用于固定嵌套对象字段类型的内存,以及用于父字段中引用的类型的类型过滤器
warmer.current | wc,warmerCurrent | current warmer ops
pri.warmer.current | | current warmer ops
warmer.total | wto,warmerTotal | total warmer ops
pri.warmer.total | | total warmer ops
warmer.total_time | wtt,warmerTotalTime | time spent in warmers
pri.warmer.total_time | | time spent in warmers
suggest.current | suc,suggestCurrent | number of current suggest ops 当前建议操作数
pri.suggest.current | | number of current suggest ops 当前主要建议操作数
suggest.time | suti,suggestTime | time spend in suggest 建议操作时间
pri.suggest.time | | time spend in suggest 主要建议操作时间
suggest.total | suto,suggestTotal | number of suggest ops 建议操作总数
pri.suggest.total | | number of suggest ops 主要建议操作数
memory.total | tm,memoryTotal | total used memory 总使用内存
pri.memory.total | | total user memory 总用户使用内存