Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-26057

[2172544] empty libvirt metrics output, when executing metrics Prometheus query on a vm that is paused status

XMLWordPrintable

    • CNV I/U Operators Sprint 234, CNV I/U Operators Sprint 235, CNV I/U Operators Sprint 236, CNV I/U Operators Sprint 237
    • High
    • No

      Description of problem:

      when running any libvirt metric on Virtual machine that is in paused status, by executing Prometheus query the output is empty.

      Version-Release number of selected component (4.12.1 - 4.13.0):

      How reproducible:
      100%

      Steps to Reproduce:
      1.create a VM > oc create -f examples/vm-cirros.yaml (or any other vm)
      2.pause the VM by executing the following command > virtctl pause VM <VM name>
      3. wait ~30 seconds
      3.run any libvirt metric by executing Prometheus query > example:
      oc exec -n openshift-monitoring prometheus-k8s-0 -c prometheus – curl -s
      http://127.0.0.1:9090/api/v1/query?query=kubevirt_vmi_cpu_usage_seconds | jq .

      Actual results:

      oc exec -n openshift-monitoring prometheus-k8s-0 -c prometheus – curl -s http://127.0.0.1:9090/api/v1/query?query=kubevirt_vmi_cpu_usage_seconds | jq .
      {
      "status": "success",
      "data":

      { "resultType": "vector", "result": [] }

      Expected results:

      oc exec -n openshift-monitoring prometheus-k8s-0 -c prometheus – curl -s http://127.0.0.1:9090/api/v1/query?query=kubevirt_vmi_cpu_usage_seconds | jq .
      {
      "status": "success",
      "data": {
      "resultType": "vector",
      "result": [
      {
      "metric":

      { "__name__": "kubevirt_vmi_cpu_usage_seconds", "container": "virt-handler", "endpoint": "metrics", "instance": "10.131.0.79:8443", "job": "kubevirt-prometheus-metrics", "kubernetes_vmi_label_kubevirt_io_nodeName": "iuo-ahmad413d-s7dpx-worker-0-clgnq", "kubernetes_vmi_label_kubevirt_io_vm": "vm-cirros-source-hpp", "name": "vm-cirros-source-hpp", "namespace": "default", "node": "iuo-ahmad413d-s7dpx-worker-0-clgnq", "pod": "virt-handler-dzztm", "service": "kubevirt-prometheus-metrics" }

      ,
      "value": [
      1677072210.101,
      "52"
      ]
      }
      ]
      }
      }

      Additional info:

              jvilaca@redhat.com João Vilaça
              rh-ee-ahafe Ahmad Hafi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: