Skip to content

Commit

Permalink
[monitor]fix can not collect cpu metrics in tencent centos (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
weiyt030505 authored and tomsun28 committed Jun 12, 2022
1 parent 2228aca commit 618d820
Showing 1 changed file with 2 additions and 2 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 @@ -99,7 +99,7 @@ metrics:
username: ^_^username^_^
password: ^_^password^_^
timeout: ^_^timeout^_^
script: "LANG=C lscpu | awk -F: '/Model name/ {print $2}';awk '/processor/{core++} END{print core}' /proc/cpuinfo;uptime | sed 's/,/ /g' | awk '{for(i=NF-2;i<=NF;i++)print $i }' | xargs;vmstat 1 1 | awk 'NR==3{print $11}';vmstat 1 1 | awk 'NR==3{print $12}';vmstat 1 1 | awk 'NR==3{print $15}'"
script: "LANG=C lscpu | awk -F: '/Model name/ {print $2}' | awk 'NR==1';awk '/processor/{core++} END{print core}' /proc/cpuinfo;uptime | sed 's/,/ /g' | awk '{for(i=NF-2;i<=NF;i++)print $i }' | xargs;vmstat 1 1 | awk 'NR==3{print $11}';vmstat 1 1 | awk 'NR==3{print $12}';vmstat 1 1 | awk 'NR==3{print $15}'"
parseType: oneRow

- name: memory
Expand Down Expand Up @@ -244,4 +244,4 @@ metrics:
password: ^_^password^_^
timeout: ^_^timeout^_^
script: df -m | tail -n +2 | awk 'BEGIN{ print "filesystem used available usage mounted"} {print $1,$3,$4,$5,$6}'
parseType: multiRow
parseType: multiRow

0 comments on commit 618d820

Please sign in to comment.