[id="virt-prometheus-queries"]
= Prometheus queries for virtual resources
include::modules/virt-document-attributes.adoc[]
:context: virt-prometheus-queries
toc::[]

{VirtProductName} provides metrics for monitoring how infrastructure resources are consumed in the cluster. The metrics cover the following resources:

* vCPU
* Network
* Storage
* Guest memory swapping

Use the {product-title} monitoring dashboard to query virtualization metrics.

.Prerequisite
* The vCPU metric requires the `schedstats=enable` kernel argument applied to the `MachineConfig` object before it can be used. This kernel argument enables scheduler statistics used for debugging and performance tuning and adds a minor additional load to the scheduler. See the xref:../../post_installation_configuration/machine-configuration-tasks.adoc#nodes-nodes-kernel-arguments_post-install-machine-configuration-tasks[{product-title} machine configuration tasks] documentation for more information on applying a kernel argument.

include::modules/monitoring-querying-metrics.adoc[leveloffset=+1]
include::modules/monitoring-querying-metrics-for-all-projects-as-an-administrator.adoc[leveloffset=+2]
include::modules/monitoring-querying-metrics-for-user-defined-projects-as-a-developer.adoc[leveloffset=+2]

include::modules/virt-querying-metrics.adoc[leveloffset=+1]

[id="{context}-additional-resources"]
== Additional resources

* xref:../../monitoring/understanding-the-monitoring-stack.adoc#understanding-the-monitoring-stack[Understanding the {product-title} monitoring stack]
