This is an automated email from the ASF dual-hosted git repository.

yinyijun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git


The following commit(s) were added to refs/heads/master by this push:
     new 5fe20dff05 [fix] remove optional metrics (#3636)
5fe20dff05 is described below

commit 5fe20dff059d3a685632214fa46a3c95c1d9a2bc
Author: Duansg <[email protected]>
AuthorDate: Thu Aug 7 00:44:35 2025 +0800

    [fix] remove optional metrics (#3636)
---
 .../src/main/resources/define/app-ubuntu.yml       | 40 +-------------------
 home/docs/help/ubuntu.md                           | 44 +++++++++++++++++++++-
 .../current/help/ubuntu.md                         | 44 +++++++++++++++++++++-
 3 files changed, 87 insertions(+), 41 deletions(-)

diff --git a/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml 
b/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml
index fa26a83b48..ae0e4598e9 100644
--- a/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml
+++ b/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml
@@ -702,42 +702,4 @@ metrics:
       # ssh proxy private key
       proxyPrivateKey: ^_^proxyPrivateKey^_^
       script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage 
command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf 
"%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11
-      parseType: multiRow
-
-  - name: avg_cpu_temp
-    i18n:
-      zh-CN: 所有核心的平均CPU温度
-      en-US: Average CPU Temperature Across All Cores
-    priority: 4
-    fields:
-      - field: avg_cpu_temp
-        type: 1
-        label: true
-        unit: 'C'
-        i18n:
-          zh-CN: 所有核心的平均温度
-          en-US: Average Temp All Cores
-    protocol: ssh
-    ssh:
-      host: ^_^host^_^
-      port: ^_^port^_^
-      username: ^_^username^_^
-      password: ^_^password^_^
-      privateKey: ^_^privateKey^_^
-      privateKeyPassphrase: ^_^privateKeyPassphrase^_^
-      timeout: ^_^timeout^_^
-      reuseConnection: ^_^reuseConnection^_^
-      script: sensors | grep "^Core\s[0-9\d+\:]" | awk  '{print $3}'  | sed 
"s/°C/\ /g" | awk '{ total += $1; count++ } END { print total/count }'
-      parseType: oneRow
-      # whether to use proxy server for ssh connection
-      useProxy: ^_^useProxy^_^
-      # ssh proxy host: ipv4 domain
-      proxyHost: ^_^proxyHost^_^
-      # ssh proxy port
-      proxyPort: ^_^proxyPort^_^
-      # ssh proxy username
-      proxyUsername: ^_^proxyUsername^_^
-      # ssh proxy password
-      proxyPassword: ^_^proxyPassword^_^
-      # ssh proxy private key
-      proxyPrivateKey: ^_^proxyPrivateKey^_^
\ No newline at end of file
+      parseType: multiRow
\ No newline at end of file
diff --git a/home/docs/help/ubuntu.md b/home/docs/help/ubuntu.md
index 633d248a75..d575d76634 100644
--- a/home/docs/help/ubuntu.md
+++ b/home/docs/help/ubuntu.md
@@ -115,8 +115,50 @@ Statistics for the top 10 processes using memory. 
Statistics include: process ID
 | cpu_usage   | %           | CPU usage               |
 | command     | None        | Executed command        |
 
-#### Metric Set: Average CPU Temperature Across All Cores
+#### Other Metric Set: Average CPU Temperature Across All Cores
 
 | Metric Name  | Metric Unit | Metric help description |
 |--------------|-------------|-------------------------|
 | avg_cpu_temp | C           | Average Temp All Cores  |
+
+* Note: This indicator information relies on the hardware sensor monitoring 
tool (lm-sensors). Please confirm that the Ubuntu operating system can obtain 
monitoring information normally. You can add the following indicator collection 
configuration as needed.
+```yaml
+metrics:
+  - name: avg_cpu_temp
+    i18n:
+      zh-CN: 所有核心的平均CPU温度
+      en-US: Average CPU Temperature Across All Cores
+    priority: 4
+    fields:
+      - field: avg_cpu_temp
+        type: 1
+        label: true
+        unit: 'C'
+        i18n:
+          zh-CN: 所有核心的平均温度
+          en-US: Average Temp All Cores
+    protocol: ssh
+    ssh:
+      host: ^_^host^_^
+      port: ^_^port^_^
+      username: ^_^username^_^
+      password: ^_^password^_^
+      privateKey: ^_^privateKey^_^
+      privateKeyPassphrase: ^_^privateKeyPassphrase^_^
+      timeout: ^_^timeout^_^
+      reuseConnection: ^_^reuseConnection^_^
+      script: sensors | grep "^Core\s[0-9\d+\:]" | awk  '{print $3}'  | sed 
"s/°C/\ /g" | awk '{ total += $1; count++ } END { print total/count }'
+      parseType: oneRow
+      # whether to use proxy server for ssh connection
+      useProxy: ^_^useProxy^_^
+      # ssh proxy host: ipv4 domain
+      proxyHost: ^_^proxyHost^_^
+      # ssh proxy port
+      proxyPort: ^_^proxyPort^_^
+      # ssh proxy username
+      proxyUsername: ^_^proxyUsername^_^
+      # ssh proxy password
+      proxyPassword: ^_^proxyPassword^_^
+      # ssh proxy private key
+      proxyPrivateKey: ^_^proxyPrivateKey^_^
+```
\ No newline at end of file
diff --git 
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/ubuntu.md 
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/ubuntu.md
index f5c60c2ee0..0867f90f43 100644
--- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/ubuntu.md
+++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/ubuntu.md
@@ -113,8 +113,50 @@ keywords: [开源监控系统, 开源操作系统监控, Ubuntu监控]
 | cpu_usage | %    | CPU占用率 |
 | command   | 无    | 执行命令   |
 
-#### 指标集合:所有核心的平均CPU温度
+#### 其他指标集合:所有核心的平均CPU温度
 
 | 指标名称         | 指标单位 | 指标帮助描述    |
 |--------------|------|-----------|
 | avg_cpu_temp | C    | 所有核心的平均温度 |
+
+* 注意:此指标信息依赖硬件传感器的监测工具(lm-sensors),请确认Ubuntu操作系统可以正常获取监测信息,可根据需要补充如下指标采集配置
+```yaml
+metrics:
+  - name: avg_cpu_temp
+    i18n:
+      zh-CN: 所有核心的平均CPU温度
+      en-US: Average CPU Temperature Across All Cores
+    priority: 4
+    fields:
+      - field: avg_cpu_temp
+        type: 1
+        label: true
+        unit: 'C'
+        i18n:
+          zh-CN: 所有核心的平均温度
+          en-US: Average Temp All Cores
+    protocol: ssh
+    ssh:
+      host: ^_^host^_^
+      port: ^_^port^_^
+      username: ^_^username^_^
+      password: ^_^password^_^
+      privateKey: ^_^privateKey^_^
+      privateKeyPassphrase: ^_^privateKeyPassphrase^_^
+      timeout: ^_^timeout^_^
+      reuseConnection: ^_^reuseConnection^_^
+      script: sensors | grep "^Core\s[0-9\d+\:]" | awk  '{print $3}'  | sed 
"s/°C/\ /g" | awk '{ total += $1; count++ } END { print total/count }'
+      parseType: oneRow
+      # whether to use proxy server for ssh connection
+      useProxy: ^_^useProxy^_^
+      # ssh proxy host: ipv4 domain
+      proxyHost: ^_^proxyHost^_^
+      # ssh proxy port
+      proxyPort: ^_^proxyPort^_^
+      # ssh proxy username
+      proxyUsername: ^_^proxyUsername^_^
+      # ssh proxy password
+      proxyPassword: ^_^proxyPassword^_^
+      # ssh proxy private key
+      proxyPrivateKey: ^_^proxyPrivateKey^_^
+```
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to