From 356431db3b54d12f9b8ba0fb3acbf040bc28b438 Mon Sep 17 00:00:00 2001 From: zhangshenghang Date: Fri, 16 Aug 2024 09:13:38 +0800 Subject: [PATCH 1/3] [improve]delete deprecate field --- .../java/org/apache/hertzbeat/common/entity/job/Metrics.java | 4 ---- .../current/advanced/extend-jmx.md | 2 +- .../current/advanced/extend-point.md | 4 ++-- .../current/advanced/extend-snmp.md | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/org/apache/hertzbeat/common/entity/job/Metrics.java b/common/src/main/java/org/apache/hertzbeat/common/entity/job/Metrics.java index 31be723c3c5..99d25fa6ac8 100644 --- a/common/src/main/java/org/apache/hertzbeat/common/entity/job/Metrics.java +++ b/common/src/main/java/org/apache/hertzbeat/common/entity/job/Metrics.java @@ -322,10 +322,6 @@ public static class Field { * Metric type 0-number: number 1-string: string */ private byte type = 1; - /** - * Whether this field is the instance - */ - private boolean instance = false; /** * Whether this field is the label */ diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-jmx.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-jmx.md index 71bb06ba2b2..07acbbeeec9 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-jmx.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-jmx.md @@ -155,7 +155,7 @@ metrics: # 具体监控指标列表 fields: # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label - # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), instance-是否是指标集合唯一标识符字段 + # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), label-是否是指标集合唯一标识符字段 - field: VmName type: 1 - field: VmVendor diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-point.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-point.md index 6de319a1c15..14a8ae96c49 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-point.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-point.md @@ -149,8 +149,8 @@ metrics: # collect metrics content # 具体监控指标列表 fields: - # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label - # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), instance-是否是指标集合唯一标识符字段 + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics labels + # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), label-是否是指标集合唯一标识符字段 - field: responseTime type: 0 unit: ms diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-snmp.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-snmp.md index 387d67c5987..6e61ec3fa81 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-snmp.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-snmp.md @@ -162,7 +162,7 @@ metrics: # 具体监控指标列表 fields: # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label - # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), instance-是否是指标集合唯一标识符字段 + # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), label-是否是指标集合唯一标识符字段 - field: name type: 1 - field: descr From e20cced2dfc9a9f2e0904bebd18e982f440bdd6a Mon Sep 17 00:00:00 2001 From: zhangshenghang Date: Fri, 16 Aug 2024 09:16:03 +0800 Subject: [PATCH 2/3] [improve]delete deprecate field --- manager/src/main/resources/define/app-spring_gateway.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manager/src/main/resources/define/app-spring_gateway.yml b/manager/src/main/resources/define/app-spring_gateway.yml index d7333237c73..4d3688ac43d 100644 --- a/manager/src/main/resources/define/app-spring_gateway.yml +++ b/manager/src/main/resources/define/app-spring_gateway.yml @@ -117,7 +117,7 @@ metrics: priority: 0 # collect metrics content fields: - # field-metric name, type-metric type(0-number,1-string), instance-is instance primary key, unit-metric unit + # field-metric name, type-metric type(0-number,1-string), label-is label primary key, unit-metric unit - field: responseTime type: 0 unit: ms @@ -262,7 +262,7 @@ metrics: i18n: zh-CN: 状态 en-US: State - instance: true + label: true - field: size type: 0 i18n: @@ -324,7 +324,7 @@ metrics: i18n: zh-CN: 空间 en-US: Space - instance: true + label: true - field: mem_used type: 0 i18n: @@ -413,7 +413,7 @@ metrics: i18n: zh-CN: 路由 ID en-US: Route ID - instance: true + label: true - field: predicate type: 1 i18n: From b4329ddeae54ce446b7ac2fcdc5d873cf35c2834 Mon Sep 17 00:00:00 2001 From: zhangshenghang Date: Fri, 16 Aug 2024 09:19:51 +0800 Subject: [PATCH 3/3] [improve]delete deprecate field --- .../current/advanced/extend-point.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-point.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-point.md index 14a8ae96c49..5f390517206 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-point.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/advanced/extend-point.md @@ -149,7 +149,7 @@ metrics: # collect metrics content # 具体监控指标列表 fields: - # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics labels + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-if is metrics label # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), label-是否是指标集合唯一标识符字段 - field: responseTime type: 0