Skip to content

Commit

Permalink
[script] modified the linux memory metrics specified script code (#719)
Browse files Browse the repository at this point in the history
  [docs]feature:change alert define trigger times from max 10 to max 999]

  [doc]feature The memory of the monitoring server cannot be monitored in the case of Chinese,Then replace script

  [doc]feature:The memory of the monitoring server cannot be monitored in the case of Chinese

---------

Co-authored-by: panghu <liuyuang1216@163.com>
  • Loading branch information
BaldFatTiger and panghu authored Mar 10, 2023
1 parent 377261c commit b804128
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions manager/src/main/resources/define/app-centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ metrics:
username: ^_^username^_^
password: ^_^password^_^
timeout: ^_^timeout^_^
script: free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}'
script: free -m | awk 'BEGIN{print "total used free buff_cache available"} NR==2{print $2,$3,$4,$6,$7}'
parseType: multiRow

- name: disk
Expand Down Expand Up @@ -340,4 +340,4 @@ metrics:
password: ^_^password^_^
timeout: ^_^timeout^_^
script: ps -aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {print $2, $3, $4, $11}'| head -n 10
parseType: multiRow
parseType: multiRow
4 changes: 2 additions & 2 deletions manager/src/main/resources/define/app-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ metrics:
username: ^_^username^_^
password: ^_^password^_^
timeout: ^_^timeout^_^
script: free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}'
script: free -m | awk 'BEGIN{print "total used free buff_cache available"} NR==2{print $2,$3,$4,$6,$7}'
parseType: multiRow

- name: disk
Expand Down Expand Up @@ -338,4 +338,4 @@ metrics:
password: ^_^password^_^
timeout: ^_^timeout^_^
script: ps -aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {print $2, $3, $4, $11}'| head -n 10
parseType: multiRow
parseType: multiRow
4 changes: 2 additions & 2 deletions manager/src/main/resources/define/app-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ metrics:
username: ^_^username^_^
password: ^_^password^_^
timeout: ^_^timeout^_^
script: free -m | grep Mem | awk 'BEGIN{print "total used free buff_cache available"} {print $2,$3,$4,$6,$7}'
script: free -m | awk 'BEGIN{print "total used free buff_cache available"} NR==2{print $2,$3,$4,$6,$7}'
parseType: multiRow

- name: disk
Expand Down Expand Up @@ -338,4 +338,4 @@ metrics:
password: ^_^password^_^
timeout: ^_^timeout^_^
script: ps -aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {print $2, $3, $4, $11}'| head -n 10
parseType: multiRow
parseType: multiRow

0 comments on commit b804128

Please sign in to comment.