diff --git a/backend/src/main/java/io/metersphere/performance/controller/request/MetricQuery.java b/backend/src/main/java/io/metersphere/performance/controller/request/MetricQuery.java index 45287778a3..3aff727df3 100644 --- a/backend/src/main/java/io/metersphere/performance/controller/request/MetricQuery.java +++ b/backend/src/main/java/io/metersphere/performance/controller/request/MetricQuery.java @@ -9,7 +9,7 @@ public class MetricQuery { return new HashMap(16) {{ // 指标名:promQL put("cpu", "100 - (avg by (instance) (irate(node_cpu_seconds_total{instance='%1$s', mode='idle'}[1m])) * 100)"); - put("disk", "100 - node_filesystem_free_bytes{instance='%1$s',fstype!~'rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs|udev|none|devpts|sysfs|debugfs|fuse.*'} / node_filesystem_size_bytes{instance='%1$s',fstype!~'rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs|udev|none|devpts|sysfs|debugfs|fuse.*'} * 100"); + put("disk", "100 - node_filesystem_free_bytes{instance='%1$s'} / node_filesystem_size_bytes{instance='%1$s'} * 100"); put("memory", "(node_memory_MemTotal_bytes{instance='%1$s'} - node_memory_MemFree_bytes{instance='%1$s'}) / node_memory_MemTotal_bytes{instance='%1$s'} * 100"); put("netIn", "sum by (instance) (irate(node_network_receive_bytes_total{instance='%1$s',device!~'bond.*?|lo'}[1m])/128)"); put("netOut", "sum by (instance) (irate(node_network_transmit_bytes_total{instance='%1$s',device!~'bond.*?|lo'}[1m])/128)"); diff --git a/frontend/src/business/components/performance/report/components/MonitorCard.vue b/frontend/src/business/components/performance/report/components/MonitorCard.vue index 785f8622ad..b120224dcd 100644 --- a/frontend/src/business/components/performance/report/components/MonitorCard.vue +++ b/frontend/src/business/components/performance/report/components/MonitorCard.vue @@ -3,25 +3,23 @@ - + - + - - - + - - - - + + + + @@ -86,6 +84,7 @@ export default { data: xAxis }, yAxis: { + name: '使用率(%)', type: 'value' }, series: [{ @@ -120,6 +119,7 @@ export default { data: xAxis }, yAxis: { + name: '使用率(%)', type: 'value' }, series: [{ @@ -154,7 +154,8 @@ export default { data: xAxis }, yAxis: { - type: 'value' + type: 'value', + name: '流量(MB/s)' }, series: [{ data: yAxis, @@ -188,7 +189,8 @@ export default { data: xAxis }, yAxis: { - type: 'value' + type: 'value', + name: '流量(MB/s)' }, series: [{ data: yAxis, @@ -222,7 +224,8 @@ export default { data: xAxis }, yAxis: { - type: 'value' + type: 'value', + name: '使用率(%)', }, series: [{ data: yAxis,