Elasticsearch 集群状态详解

news2024/11/26 0:52:50

cluster state 返回结果详解

GET /_cluster/state

https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html

详细信息如下:

{
	"cluster_name": "business-log",
	"cluster_uuid": "ArYy-qmCTbCQTDUI8ogsBg",
	"version": 497261,
	"state_uuid": "6_u2t1A1Rnyw70hfp7eWIQ",
	"master_node": "1WRaRyU-SuCPn8qbz3e4hg",
	"blocks": {
		"indices": {
			".kibana_1": {
				"8": {
					"description": "index write (api)",
					"retryable": false,
					"levels": [
						"write"
					]
				}
			}
		}
	},
	"nodes": {
		"hYrrmhLHTx-QHoDmZ2wATg": {
			"__jiankunking_comment__": "节点名称、监听地址和端口等信息",
			"name": "es-b-220",
			"ephemeral_id": "Pk0I_YgZQKe0bK1EIQ8R-w",
			"transport_address": "127.0.220.220:9301",
			"attributes": {
				"ml.machine_memory": "135202910208",
				"ml.max_open_jobs": "512",
				"xpack.installed": "true",
				"ml.max_jvm_size": "33285996544",
				"transform.node": "true"
			},
			"roles": [
				"data",
				"data_cold",
				"data_content",
				"data_frozen",
				"data_hot",
				"data_warm",
				"ingest",
				"master",
				"ml",
				"remote_cluster_client",
				"transform"
			]
		}
	},
	"metadata": {
		"__metadata_jiankunking_comment__": "集群元数据",
		"cluster_uuid": "ArYy-qmCTbCQTDUI8ogsBg",
		"cluster_uuid_committed": true,
		"__cluster_uuid_committed_comment__": "Whether the current node with the given cluster state is locked into the cluster with the UUID returned by {@link #clusterUUID()}, meaning that it will not accept any cluster state with a different clusterUUID. https://github.com/jiankunking/elasticsearch/blob/692cca611db5db3365cba45320879f4e05d3d7d2/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java#L241",
		"cluster_coordination": {
			"term": 92,
			"__last_committed_config_comment__": "https://www.elastic.co/guide/en/elasticsearch/reference/7.13/modules-discovery-voting.html"
			"last_committed_config": [
				"hYrrmhLHTx-QHoDmZ2wATg",
				"jaNLhd1eT6SUYcLJkHpE1Q",
				"1VQFmt9jQ-6d7fCMjP-vnQ",
				"uzGdH3VeRbOlcDIWeKdgIw",
				"PhjlCea6TNKh4rdZPyPDkA",
				"ZFQdNP4HSgCtPCnMfDdopw",
				"1WRaRyU-SuCPn8qbz3e4hg"
			],
			"last_accepted_config": [
				"hYrrmhLHTx-QHoDmZ2wATg",
				"jaNLhd1eT6SUYcLJkHpE1Q",
				"1VQFmt9jQ-6d7fCMjP-vnQ",
				"uzGdH3VeRbOlcDIWeKdgIw",
				"PhjlCea6TNKh4rdZPyPDkA",
				"ZFQdNP4HSgCtPCnMfDdopw",
				"1WRaRyU-SuCPn8qbz3e4hg"
			],
			"voting_config_exclusions": []
		},
		"templates": {
			"__templates_jiankunking_comment__": "全部模板的具体内容",
			"k8s-log-template": {
				"order": 0,
				"index_patterns": [
					"logstash-*"
				],
				"settings": {
					"index": {
						"codec": "best_compression",
						"refresh_interval": "30s",
						"number_of_shards": "3",
						"number_of_replicas": "1"
					}
				},
				"mappings": {
					"_doc": {
						"dynamic_templates": [
							{
								"strings_as_keywords": {
									"unmatch": "log",
									"mapping": {
										"type": "keyword"
									},
									"match_mapping_type": "string"
								}
							},
							{
								"log": {
									"mapping": {
										"norms": false,
										"analyzer": "standard",
										"type": "text"
									},
									"match_mapping_type": "string",
									"match": "log"
								}
							},
							{
								"@timestamp": {
									"mapping": {
										"type": "date"
									},
									"match_mapping_type": "date",
									"match": "@timestamp"
								}
							}
						]
					}
				},
				"aliases": {}
			}
		},
		"indices": {
			"__indices_jiankunking_comment__": "索引列表",
			"logstash-2023.11.06": {
				"version": 27,
				"mapping_version": 20,
				"settings_version": 1,
				"aliases_version": 1,
				"routing_num_shards": 896,
				"state": "open",
				"settings": {
					"index": {
						"codec": "best_compression",
						"routing": {
							"allocation": {
								"include": {
									"_tier_preference": "data_content"
								}
							}
						},
						"refresh_interval": "30s",
						"number_of_shards": "7",
						"provided_name": "logstash-2023.11.06",
						"creation_date": "1699200016628",
						"number_of_replicas": "1",
						"uuid": "eplKvvIaSpaTzwqhjwGNYQ",
						"version": {
							"created": "7130499"
						}
					}
				},
				"mappings": {
					"_doc": {
						"dynamic_templates": [
							{
								"strings_as_keywords": {
									"unmatch": "log",
									"mapping": {
										"type": "keyword"
									},
									"match_mapping_type": "string"
								}
							},
							{
								"log": {
									"mapping": {
										"norms": false,
										"analyzer": "standard",
										"type": "text"
									},
									"match_mapping_type": "string",
									"match": "log"
								}
							},
							{
								"@timestamp": {
									"mapping": {
										"type": "date"
									},
									"match_mapping_type": "date",
									"match": "@timestamp"
								}
							}
						],
						"properties": {
							"cluster": {
								"type": "keyword"
							},
							"kubernetes": {
								"properties": {
									"container_name": {
										"type": "keyword"
									},
									"statefulset": {
										"properties": {
											"name": {
												"type": "keyword"
											}
										}
									},
									"annotations": {
										"properties": {
											"helm_sh/namespace": {
												"type": "keyword"
											},
											"helm_sh/release": {
												"type": "keyword"
											}
										}
									},
									"namespace_uid": {
										"type": "keyword"
									},
									"namespace_labels": {
										"properties": {
											"kubernetes_io/metadata_name": {
												"type": "keyword"
											},
											"control-plane": {
												"type": "keyword"
											}
										}
									},
									"namespace_name": {
										"type": "keyword"
									},
									"pod_name": {
										"type": "keyword"
									}
								}
							},
							"log": {
								"norms": false,
								"analyzer": "standard",
								"type": "text"
							},
							"node_name": {
								"type": "keyword"
							},
							"@timestamp": {
								"type": "date"
							}
						}
					}
				},
				"aliases": [],
				"primary_terms": {
					"__primary_terms_jiankunking_comment__": "某个分片被选为主分片的次数,用于区分新旧主分片;https://www.devopsschool.com/blog/what-is-seq_no-and-primary_term-in-elasticsearch/",
					"0": 1,
					"1": 2,
					"2": 4,
					"3": 3,
					"4": 1,
					"5": 7,
					"6": 4
				},
				"in_sync_allocations": {
					"__in_sync_allocations_jiankunking_comment__": "同步分片列表,代表某个分片中拥有最新数据的分片列表",
					"5": [
						"pYyuBTo0QVeuvY2PrADVJQ",
						"zfP06et8TOuy3NAUirRO1w"
					],
					"6": [
						"EQl7pge5ST26Wnz-lGLB6g",
						"J1PeYw0fSpyNdNl_PJ1PAA"
					],
					"2": [
						"BmcC-XHYR36suKmyGqA_DQ",
						"53scs4-9SuWB-YgZ000SLg"
					],
					"4": [
						"HWbwWFWfRKmiRQXVA7KVrA",
						"539ACU5IQGyjXGcbqDpZcA"
					],
					"3": [
						"o3YjH-7qQpSEX1FQKVUoDQ",
						"DezGojWLSiOKSvEex1vH6Q"
					],
					"1": [
						"jkBt1_D1Sni_3Uo2k8gJow",
						"cyKkS7K2Q1uXY_1F44w9ow"
					],
					"0": [
						"Th7wtq7RQASfrRj5csnz0w",
						"GVifsKOwTlqhxGpgYVOdfQ"
					]
				},
				"rollover_info": {},
				"system": false,
				"timestamp_range": {
					"unknown": true
				}
			}
		},
		"ingest": {
			"pipeline": [
				{
					"id": "xpack_monitoring_6",
					"config": {
						"description": "This pipeline upgrades documents from the older version of the Monitoring API to the newer version (7) by fixing breaking changes in those older documents before they are indexed from the older version (6).",
						"version": 7120099,
						"processors": [
							{
								"script": {
									"source": "ctx._type = null"
								}
							},
							{
								"gsub": {
									"field": "_index",
									"pattern": "(.monitoring-\\w+-)6(-.+)",
									"replacement": "$17$2"
								}
							}
						]
					}
				}
			]
		},
		"index_template": {
			"__index_template_jiankunking_comment__": "模板有两种类型:索引模板和组件模板。 组件模板是可重用的构建块,用于配置映射,设置和别名。 你使用组件模板来构造索引模板,但它们不会直接应用于一组索引。 索引模板可以包含组件模板的集合,也可以直接指定设置,映射和别名。https://blog.csdn.net/UbuntuTouch/article/details/113751797",
			"index_template": {
				"logs": {
					"index_patterns": [
						"logs-*-*"
					],
					"composed_of": [
						"logs-mappings",
						"logs-settings"
					],
					"priority": 100,
					"version": 0,
					"_meta": {
						"description": "default logs template installed by x-pack",
						"managed": true
					},
					"data_stream": {
						"hidden": false
					},
					"allow_auto_create": true
				}
			}
		},
		"data_stream": {
			"data_stream": {
				"ilm-history-5": {
					"name": "ilm-history-5",
					"timestamp_field": {
						"name": "@timestamp"
					},
					"indices": [
						{
							"index_name": ".ds-ilm-history-5-2023.07.18-000024",
							"index_uuid": "ovhEhrqgQmq6MR4pLk2m4A"
						},
						{
							"index_name": ".ds-ilm-history-5-2023.08.17-000025",
							"index_uuid": "5zw095VyRJyWBlAovftH3g"
						},
						{
							"index_name": ".ds-ilm-history-5-2023.09.16-000026",
							"index_uuid": "nIRDt047TmSLIc-P7fW4Ug"
						},
						{
							"index_name": ".ds-ilm-history-5-2023.10.16-000027",
							"index_uuid": "1F4fEU6YTnynu06PWcZ9LQ"
						}
					],
					"generation": 27,
					"_meta": {
						"description": "index template for ILM history indices",
						"managed": true
					},
					"hidden": true,
					"replicated": false,
					"system": false
				}
			}
		},
		"index-graveyard": {
			"__index-graveyard_jiankunking_comment__": "index-graveyard:索引墓碑。记录已删除的索引,并保存一段时间。索引删除是主节点通过下发集群状态来执行的;各节点处理集群状态是异步的过程。例如,索引分片分布在5个节点上,删除索引期间,某个节点是“down”掉的,没有执行删除逻辑;当这个节点恢复的时候,其存储的已删除的索引会被当作孤立资源加入集群,索引死而复活。墓碑的作用就是防止发生这种情况。",
			"tombstones": [
				{
					"__tombstones_jiankunking_comment__": "已删除的索引列表"
				},
				{
					"index": {
						"index_name": "logstash-hic-2023.10.13",
						"index_uuid": "wLl2HTaDQ7-UuKuvpu_Y8w"
					},
					"delete_date_in_millis": 1699068185273
				},
				{
					"index": {
						"index_name": "logstash-mplat-2023.10.13",
						"index_uuid": "sDM_kklIST6ym1cLZ3RKDQ"
					},
					"delete_date_in_millis": 1699068185273
				}
			]
		},
		"index_lifecycle": {
			"policies": {
				"kibana-event-log-policy": {
					"policy": {
						"phases": {
							"hot": {
								"min_age": "0ms",
								"actions": {
									"rollover": {
										"max_size": "50gb",
										"max_age": "30d"
									}
								}
							},
							"delete": {
								"min_age": "90d",
								"actions": {
									"delete": {
										"delete_searchable_snapshot": true
									}
								}
							}
						}
					},
					"headers": {},
					"version": 1,
					"modified_date": 1630029263987,
					"modified_date_string": "2021-08-27T01:54:23.987Z"
				},
				"logs": {
					"policy": {
						"phases": {
							"hot": {
								"min_age": "0ms",
								"actions": {
									"rollover": {
										"max_primary_shard_size": "50gb",
										"max_age": "30d"
									}
								}
							}
						}
					},
					"headers": {},
					"version": 1,
					"modified_date": 1630029123825,
					"modified_date_string": "2021-08-27T01:52:03.825Z"
				}
			},
			"operation_mode": "RUNNING"
		},
		"component_template": {
			"__component_template_jiankunking_comment__": "模板有两种类型:索引模板和组件模板。 组件模板是可重用的构建块,用于配置映射,设置和别名。 你使用组件模板来构造索引模板,但它们不会直接应用于一组索引。 索引模板可以包含组件模板的集合,也可以直接指定设置,映射和别名。https://blog.csdn.net/UbuntuTouch/article/details/113751797",
			"component_template": {
				"logs-settings": {
					"template": {
						"settings": {
							"index": {
								"lifecycle": {
									"name": "logs"
								},
								"codec": "best_compression",
								"query": {
									"default_field": [
										"message"
									]
								}
							}
						}
					},
					"version": 0,
					"_meta": {
						"description": "default settings for the logs index template installed by x-pack",
						"managed": true
					}
				},
				"logs-mappings": {
					"template": {
						"mappings": {
							"dynamic_templates": [
								{
									"strings_as_keyword": {
										"mapping": {
											"ignore_above": 1024,
											"type": "keyword"
										},
										"match_mapping_type": "string"
									}
								}
							],
							"date_detection": false,
							"properties": {
								"@timestamp": {
									"type": "date"
								},
								"ecs": {
									"properties": {
										"version": {
											"ignore_above": 1024,
											"type": "keyword"
										}
									}
								},
								"data_stream": {
									"properties": {
										"namespace": {
											"type": "constant_keyword"
										},
										"type": {
											"type": "constant_keyword",
											"value": "logs"
										},
										"dataset": {
											"type": "constant_keyword"
										}
									}
								},
								"host": {
									"properties": {
										"ip": {
											"type": "ip"
										}
									}
								},
								"message": {
									"type": "text"
								}
							}
						}
					},
					"version": 0,
					"_meta": {
						"description": "default mappings for the logs index template installed by x-pack",
						"managed": true
					}
				}
			}
		}
	},
	"routing_table": {
		"__routing_table_jiankunking_comment__": "内容路由表,存储某个分片位于哪个节点的信息,通过分片找到节点。",
		"indices": {
			"__indices_jiankunking_comment__": "全部索引列表",
			"logstash-bsr-2023.10.23": {
				"shards": {
					"__shards_jiankunking_comment__": "该索引的全部分片列表",
					"5": [
						{
							"state": "STARTED",
							"__state_jiankunking_comment__": "分片可能的状态: UNASSIGNED、INITIALIZING、STARTED、RELOCATING",
							"primary": false,
							"node": "uzGdH3VeRbOlcDIWeKdgIw",
							"__relocating_node_jiankunking_comment__": "正在relocation到哪个节点",
							"relocating_node": null,
							"shard": 5,
							"index": "logstash-bsr-2023.10.23",
							"allocation_id": {
								"id": "TLi8WkbHTrSalefIIyUYgA"
							}
						},
						{
							"state": "STARTED",
							"primary": true,
							"node": "1VQFmt9jQ-6d7fCMjP-vnQ",
							"relocating_node": null,
							"shard": 5,
							"index": "logstash-bsr-2023.10.23",
							"allocation_id": {
								"__jiankunking_comment__": "分片唯一的allocation_id配合in_sync_allocations使用",
								"id": "M7FK6iV0RDSH_DYwSbdhrA"
							}
						}
					]
				}
			}
		}
	},
	"routing_nodes": {
		"__routing_nodes_jiankunking_comment__": "储某个节点存储了哪些分片的信息。通过节点找到分片",
		"unassigned": [],
		"nodes": {
			"hYrrmhLHTx-QHoDmZ2wATg": [
				{
					"state": "STARTED",
					"primary": false,
					"node": "hYrrmhLHTx-QHoDmZ2wATg",
					"relocating_node": null,
					"shard": 1,
					"index": "logstash-bsr-2023.10.23",
					"allocation_id": {
						"id": "ifq-S_55Rs-o-jNWx5JPkQ"
					}
				}
			]
		}
	}
}

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1190962.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

ClickHouse Keeper: Coordination without the drawbacks没有缺点的分布式协作系统

ClickHouse Keeper 介绍 现代分布式系统需要一个共享和可靠的信息存储库和共识系统来协调和同步分布式操作。对于ClickHouse来说,ZooKeeper最初是被选中的。它的广泛使用是可靠的,提供了简单而强大的API,并提供了合理的性能。 然而&#xf…

[工业自动化-8]:西门子S7-15xxx编程 - PLC主站 - CPU模块

目录 前言: 一、概述 二、CPU操作和显示 三、安装 四、CPU的选择 前言: 一、概述 西门子S7-1500系列是一系列高性能工业自动化控制器,广泛应用于制造业、自动化生产、物流等领域。这个系列的控制器是设计用来满足高性能、高效能要求的复…

板刷codeforces 1000分

练习 1.Problem - 1A - Codeforces AC代码: #include <bits/stdc.h> #define endl \n #define int long long using namespace std; int n,m,a; void solve() {cin>>n>>m>>a;cout<<(n/a(n%a!0))*(m/a(m%a!0))<<endl; } signed main() {…

《童年》 思维导图

《童年》是高尔基自传体小说三部曲中的第一部&#xff0c;讲述的是高尔基幼年丧父、母亲改嫁&#xff0c;他跟随日渐破落的小染坊主外公以及外婆生活的童年经历。小说通过一个儿童天真无邪的眼光&#xff0c;向读者生动地展示了19世纪中叶俄罗斯社会底层人民的生活状态&#xf…

Apache APISIX 的 Admin API 默认访问令牌漏洞(CVE-2020-13945)漏洞复现

漏洞描述 Apache APISIX 是一个动态、实时、高性能的 API 网关。Apache APISIX 有一个默认的内置 API 令牌&#xff0c;可用于访问所有 admin API&#xff0c;通过 2.x 版本中添加的参数导致远程执行 LUA 代码。 漏洞环境及利用 启动docker环境 访问9080端口 通过 admin api…

Centos7安装配置中文输入法

Centos7安装配置中文输入法 在安装CentOS时&#xff0c;我们为了方便使用&#xff0c;语言选择了中文&#xff0c;但是我们发现&#xff0c;在Linux命令行或者是浏览器中输入时&#xff0c;我们只能输入英文&#xff0c;无法输入汉字。 来&#xff0c;跟随脚步&#xff0c;设…

【java】【MyBatisPlus】【四】【完】MyBatisPlus一些实战总结(枚举、翻页、sql、组合条件、自增主键、逻辑删除)

目录 一、枚举 1、数据库type字段是Integer 类型枚举 2、创建一个该字段的枚举类 TypeEnum 3、修改实体类 4、配置文件新增mybatis-plus的配置 5、检验&#xff1a; 5.1 查询显示 5.3 库里验证 二、自增主键不是id字段处理 三、逻辑删除字段不是delete字段处理 1、实…

【Linux网络】2分钟学习centos7永久修改网卡名称

目录 第一步&#xff0c;先查看网卡名称 第二步&#xff1a;先修改配置文件/etc/default/grub&#xff0c;添加net.ifnemes0 第三步&#xff1a;重新加载内核配置grub2-mkconfig -o /boot/grub2/grub.cfg 第四步&#xff1a;重启电脑 第五步&#xff1a;查看网卡名称&…

No module named ‘importlib.metadata‘

解决办法 参考博客 https://wenku.csdn.net/answer/45a1563cc02e9592dd1d1d28fe7b88e7 pip install importlib_metadata

基于工业智能网关的汽车充电桩安全监测方案

近年来&#xff0c;我国新能源汽车产业得到快速发展&#xff0c;电动车产量和销量都在持续增长&#xff0c;不仅国内市场竞争激烈&#xff0c;而且也远销海外&#xff0c;成为新的经济增长点。但与此同时&#xff0c;充电设施的运营却面临着安全和效率的双重挑战。 当前的充电桩…

python特殊循环队列_队中元素个数代替队尾指针

对于循环队列来说&#xff0c;如果知道队头指针和队中元素个数&#xff0c;则可以计算出队尾指针。也就是说&#xff0c;可以用队中元素个数代替队尾指针。设计出这种循环队列的判队空、进队、出队和取队头元素的算法。 本例的循环队列包含data 数组、队头指针 front和队中元素…

猫头虎博主第7期赠书活动:《计算机考研精炼1000题》

&#x1f337;&#x1f341; 博主猫头虎 带您 Go to New World.✨&#x1f341; &#x1f984; 博客首页——猫头虎的博客&#x1f390; &#x1f433;《面试题大全专栏》 文章图文并茂&#x1f995;生动形象&#x1f996;简单易学&#xff01;欢迎大家来踩踩~&#x1f33a; &a…

mac M2 pytorch_geometric安装

我目前的环境是mac M2&#xff0c;我在base环境中安装了pytorch_geometric,仅仅做测试用的&#xff0c;不做真正跑代码的测试 首先我的base环境的设置如下&#xff1a; pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.…

Android Camera App启动流程解析

前言&#xff1a;做了7年的camera app开发&#xff0c;给自己一个总结&#xff0c;算是对camera的一次告白吧。Camera被大家誉为手机的眼睛&#xff0c;是现在各大手机厂商的卖点&#xff0c;也是各大厂商重点发力的地方。Camera的重要性我就不在这里赘述了&#xff0c;让我们进…

计网自顶向下(Web服务器+UDPping+邮件客户端)

目录 &#x1f416;前言 &#x1f33c;Web服务器(作业1) &#x1f333;过程 &#x1f333;解释 &#x1f525;代码 &#x1f33c;UDPping程序(作业2) &#x1f333;过程 &#x1f333;解释 Client Server 整体逻辑 &#x1f525;代码 &#x1f33c;邮件客户端(作业…

粤嵌实训医疗项目(小组开发)--day05

目录 一、医生功能模块 ------------前端实现------------ ------------后端接口------------ 功能一&#xff1a;分页查询医生基础信息&#xff08;介绍MybatisPlus如何使用分页&#xff09; 功能二&#xff1a;根据搜索栏名称查找对应医生&#xff08;讲解自定义查询集&…

SRRC认证的必要性:保障电子产品质量安全的重要措施

随着电子产品的普及和应用&#xff0c;对电子产品的质量安全要求也越来越高。为了保障消费者的权益和安全&#xff0c;国家对电子产品进行了严格的监管和管理。其中&#xff0c;SRRC认证是保障电子产品质量安全的重要措施之一。 SRRC认证是指在我国境内生产、销售、使用的无线电…

(动手学习深度学习)第13章 计算机视觉---图像增广与微调

13.1 图像增广 总结 数据增广通过变形数据来获取多样性从而使得模型泛化性能更好常见图片增广包裹翻转、切割、变色。 图像增广代码实现

简单剖析程序的翻译过程!

本文旨在讲解一段源程序如何翻译成机器所能识别的二进制的命令的&#xff0c;希望通过本文&#xff0c;能使读者对一段程序的翻译过程有进一步的认识&#xff01; 这里首先要介绍的是一段程序从编写完成到执行需要经过以下几个步骤&#xff01; 1.预处理 首先讲到的是预处理&…

十八章总结

一.Swing概述 二.Swing常用窗体 1.JFrame窗体 创建一个不可见、具有标题的窗体&#xff0c;关键代码&#xff1a; JFrame jfnew JFrame("登陆系统"); Container containerjf.getContentPane(); 删除容器中的按钮&#xff0c;关键代码&#xff1a; container.remo…