Skip to content

Commit

Permalink
Fix no data on VM Metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Wang <w13915984028@gmail.com>
  • Loading branch information
w13915984028 authored and bk201 committed Apr 8, 2024
1 parent 2689ff5 commit 1eb5122
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/config/templates/rancherd-12-monitoring-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ resources:
"steppedLine": false,
"targets": [
{
"expr": "topk(${count}, (avg(rate(kubevirt_vmi_vcpu_seconds[5m])) by (domain, name))) ",
"expr": "topk(${count}, (avg(rate(kubevirt_vmi_vcpu_seconds_total[5m])) by (domain, name))) ",
"instant": false,
"interval": "",
"legendFormat": "{{name}}",
Expand Down Expand Up @@ -903,7 +903,7 @@ resources:
"pluginVersion": "7.5.8",
"targets": [
{
"expr": "sum(avg(rate(kubevirt_vmi_vcpu_seconds{namespace=\"$namespace\", name=\"$vm\"}[5m])) by (domain, name))",
"expr": "sum(avg(rate(kubevirt_vmi_vcpu_seconds_total{namespace=\"$namespace\", name=\"$vm\"}[5m])) by (domain, name))",
"format": "time_series",
"instant": false,
"interval": "",
Expand Down Expand Up @@ -1136,15 +1136,15 @@ resources:
"steppedLine": false,
"targets": [
{
"expr": "irate(kubevirt_vmi_storage_read_times_ms_total{namespace=\"$namespace\", name=\"$vm\"}[5m])",
"expr": "irate(kubevirt_vmi_storage_read_times_seconds_total{namespace=\"$namespace\", name=\"$vm\"}[5m])",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{drive}}-read",
"refId": "A"
},
{
"expr": "irate(kubevirt_vmi_storage_write_times_ms_total{namespace=\"$namespace\", name=\"$vm\"}[5m])",
"expr": "irate(kubevirt_vmi_storage_write_times_seconds_total{namespace=\"$namespace\", name=\"$vm\"}[5m])",
"interval": "",
"legendFormat": "{{drive}}-write",
"refId": "B"
Expand All @@ -1171,7 +1171,7 @@ resources:
"yaxes": [
{
"$$hashKey": "object:361",
"format": "ms",
"format": "s",
"label": null,
"logBase": 1,
"max": null,
Expand Down Expand Up @@ -1417,7 +1417,7 @@ resources:
"value": "default"
},
"datasource": null,
"definition": "label_values(kubevirt_vmi_vcpu_seconds, namespace)",
"definition": "label_values(kubevirt_vmi_vcpu_seconds_total, namespace)",
"description": null,
"error": null,
"hide": 0,
Expand All @@ -1427,7 +1427,7 @@ resources:
"name": "namespace",
"options": [],
"query": {
"query": "label_values(kubevirt_vmi_vcpu_seconds, namespace)",
"query": "label_values(kubevirt_vmi_vcpu_seconds_total, namespace)",
"refId": "Prometheus-namespace-Variable-Query"
},
"refresh": 1,
Expand All @@ -1448,7 +1448,7 @@ resources:
"value": "tt"
},
"datasource": null,
"definition": "label_values(kubevirt_vmi_vcpu_seconds{namespace=\"$namespace\"}, name)",
"definition": "label_values(kubevirt_vmi_vcpu_seconds_total{namespace=\"$namespace\"}, name)",
"description": null,
"error": null,
"hide": 0,
Expand All @@ -1458,7 +1458,7 @@ resources:
"name": "vm",
"options": [],
"query": {
"query": "label_values(kubevirt_vmi_vcpu_seconds{namespace=\"$namespace\"}, name)",
"query": "label_values(kubevirt_vmi_vcpu_seconds_total{namespace=\"$namespace\"}, name)",
"refId": "Prometheus-vm-Variable-Query"
},
"refresh": 1,
Expand Down

0 comments on commit 1eb5122

Please sign in to comment.