This is an automated email from the ASF dual-hosted git repository.
gongchao 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 120f3a12f [fix] fix the Linux process monitoring process exits
abnormally without warning (#2810)
120f3a12f is described below
commit 120f3a12fe040c5cc61b9a8950d2121bb2d9f754
Author: liutianyou <[email protected]>
AuthorDate: Mon Nov 11 14:09:30 2024 +0800
[fix] fix the Linux process monitoring process exits abnormally without
warning (#2810)
Co-authored-by: Zhang Yuxuan <[email protected]>
---
hertzbeat-manager/src/main/resources/define/app-process.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hertzbeat-manager/src/main/resources/define/app-process.yml
b/hertzbeat-manager/src/main/resources/define/app-process.yml
index f4e987ee9..73a3ed11a 100644
--- a/hertzbeat-manager/src/main/resources/define/app-process.yml
+++ b/hertzbeat-manager/src/main/resources/define/app-process.yml
@@ -194,7 +194,7 @@ metrics:
reuseConnection: ^_^reuseConnection^_^
# ssh run collect script
# ssh response data parse type: oneRow, multiRow
- script: ps -eo pid,user,%cpu,%mem,rss,cmd | grep -v grep | grep
'^_^process_name^_^' | awk 'BEGIN {print "pid user cpu mem rss cmd"}
{cmd=substr($0, index($0, $6)); gsub(/ /, " ", cmd); print $1, $2, $3, $4, $5,
cmd}'
+ script: output=$(ps -ef|grep '^_^process_name^_^'|grep -v grep); [ -n
"$output" ] && ps -eo pid,user,%cpu,%mem,rss,cmd | grep -v grep | grep
'^_^process_name^_^' | awk 'BEGIN {print "pid user cpu mem rss cmd"}
{cmd=substr($0, index($0, $6)); gsub(/ /, " ", cmd); print $1, $2, $3, $4, $5,
cmd}'
parseType: multiRow
- name: mem
i18n:
@@ -203,7 +203,7 @@ metrics:
# metrics scheduling priority(0->127)->(high->low), metrics with the same
priority will be scheduled in parallel
# priority 0's metrics is availability metrics, it will be scheduled
first, only availability metrics collect success will the scheduling continue
- priority: 0
+ priority: 1
# collect metrics content
fields:
@@ -247,7 +247,7 @@ metrics:
en-US: Other
# metrics scheduling priority(0->127)->(high->low), metrics with the same
priority will be scheduled in parallel
# priority 0's metrics is availability metrics, it will be scheduled
first, only availability metrics collect success will the scheduling continue
- priority: 0
+ priority: 1
# collect metrics content
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric
unit('%','ms','MB'), label-whether it is a metrics label field
@@ -299,7 +299,7 @@ metrics:
en-US: IO
# metrics scheduling priority(0->127)->(high->low), metrics with the same
priority will be scheduled in parallel
# priority 0's metrics is availability metrics, it will be scheduled
first, only availability metrics collect success will the scheduling continue
- priority: 0
+ priority: 1
# collect metrics content
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric
unit('%','ms','MB'), label-whether it is a metrics label field
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]