[fix] Optimize the issue where missing tags cause alert statuses to become disordered (#3829)

Co-authored-by: aias00 <liuhongyu@apache.org>
diff --git a/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml b/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml
index 77cc973..335488a 100644
--- a/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml
+++ b/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml
@@ -136,6 +136,13 @@
           zh-CN: 创建时间
           en-US: Creation Time
           ja-JP: 作成時間
+      - field: uid
+        type: 1
+        i18n:
+          zh-CN: Uid
+          en-US: Uid
+          ja-JP: Uid
+        label: true
     # (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
     aliasFields:
       - $.metadata.name
@@ -145,6 +152,7 @@
       - $.status.allocatable.cpu
       - $.status.allocatable.memory
       - $.metadata.creationTimestamp
+      - $.metadata.uid
     # (optional)mapping and conversion expressions, use these and aliasField above to calculate metrics value
     # eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
     calculates:
@@ -155,6 +163,7 @@
       - capacity_memory=$.status.capacity.memory
       - allocatable_memory=$.status.allocatable.memory
       - creation_time=$.metadata.creationTimestamp
+      - uid=$.metadata.uid
     # (optional)field unit mapping and conversion expressions, origin unit -> final unit
     units:
       - capacity_memory=Ki->Mi
@@ -193,14 +202,23 @@
           zh-CN: 创建时间
           en-US: Creation Time
           ja-JP: 作成時間
+      - field: uid
+        type: 1
+        i18n:
+          zh-CN: Uid
+          en-US: Uid
+          ja-JP: Uid
+        label: true
     aliasFields:
       - $.metadata.name
       - $.status.phase
       - $.metadata.creationTimestamp
+      - $.metadata.uid
     calculates:
       - namespace=$.metadata.name
       - status=$.status.phase
       - creation_time=$.metadata.creationTimestamp
+      - uid=$.metadata.uid
     protocol: http
     http:
       host: ^_^host^_^
@@ -265,6 +283,13 @@
           zh-CN: 启动时间
           en-US: Start Time
           ja-JP: 起動時間
+      - field: uid
+        type: 1
+        i18n:
+          zh-CN: Uid
+          en-US: Uid
+          ja-JP: Uid
+        label: true
     aliasFields:
       - $.metadata.name
       - $.metadata.namespace
@@ -274,6 +299,7 @@
       - $.status.podIP
       - $.metadata.creationTimestamp
       - $.status.startTime
+      - $.metadata.uid
     calculates:
       - pod=$.metadata.name
       - namespace=$.metadata.namespace
@@ -283,6 +309,7 @@
       - pod_ip=$.status.podIP
       - creation_time=$.metadata.creationTimestamp
       - start_time=$.status.startTime
+      - uid=$.metadata.uid
     protocol: http
     http:
       host: ^_^host^_^
@@ -335,6 +362,13 @@
           zh-CN: 创建时间
           en-US: Creation Time
           ja-JP: 作成時間
+      - field: uid
+        type: 1
+        i18n:
+          zh-CN: Uid
+          en-US: Uid
+          ja-JP: Uid
+        label: true
     aliasFields:
       - $.metadata.name
       - $.metadata.namespace
@@ -342,6 +376,7 @@
       - $.spec.clusterIP
       - $.spec.selector
       - $.metadata.creationTimestamp
+      - $.metadata.uid
     calculates:
       - service=$.metadata.name
       - namespace=$.metadata.namespace
@@ -349,6 +384,7 @@
       - cluster_ip=$.spec.clusterIP
       - selector=$.spec.selector
       - creation_time=$.metadata.creationTimestamp
+      - uid=$.metadata.uid
     protocol: http
     http:
       host: ^_^host^_^
diff --git a/home/docs/help/kubernetes.md b/home/docs/help/kubernetes.md
index 836c84f..c148813 100644
--- a/home/docs/help/kubernetes.md
+++ b/home/docs/help/kubernetes.md
@@ -61,6 +61,7 @@
 | capacity_memory    | None        | Memory capacity       |
 | allocatable_memory | None        | Memory                | allocated |
 | creation_time      | None        | Node creation time    |
+| uid                | None        | UUID unique identifier|
 
 #### metric Collection: namespaces
 
@@ -69,6 +70,7 @@
 | namespace     | None        | namespace name        |
 | status        | None        | Status                |
 | creation_time | None        | Created               |
+| uid           | None        | UUID unique identifier|
 
 #### metric collection: pods
 
@@ -82,6 +84,7 @@
 | pod_ip        | None        | pod ip                        |
 | creation_time | None        | Pod creation time             |
 | start_time    | None        | Pod startup time              |
+| uid           | None        | UUID unique identifier        |
 
 #### metric Collection: services
 
@@ -93,3 +96,4 @@
 | cluster_ip    | None        | cluster ip                                                |
 | selector      | None        | tag selector matches                                      |
 | creation_time | None        | Created                                                   |
+| uid           | None        | UUID unique identifier                                    |
diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kubernetes.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kubernetes.md
index 58ed7e3..ad09004 100644
--- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kubernetes.md
+++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kubernetes.md
@@ -64,6 +64,7 @@
 | capacity_memory    | 无    | 内存容量   |
 | allocatable_memory | 无    | 已分配内存  |
 | creation_time      | 无    | 节点创建时间 |
+| uid                | 无    | UUID 唯一标识符 |
 
 #### 指标集合:namespaces
 
@@ -72,6 +73,7 @@
 | namespace     | 无    | namespace名称 |
 | status        | 无    | 状态          |
 | creation_time | 无    | 创建时间        |
+| uid           | 无    | UUID 唯一标识符 |
 
 #### 指标集合:pods
 
@@ -85,6 +87,7 @@
 | pod_ip        | 无    | pod ip         |
 | creation_time | 无    | pod创建时间        |
 | start_time    | 无    | pod启动时间        |
+| uid           | 无    | UUID 唯一标识符 |
 
 #### 指标集合:services
 
@@ -96,3 +99,4 @@
 | cluster_ip    | 无    | cluster ip                                             |
 | selector      | 无    | tag selector匹配                                         |
 | creation_time | 无    | 创建时间                                                   |
+| uid           | 无    | UUID 唯一标识符 |