Libvirt Overview

Metrics

General Domain Metrics

libvirt_domains_number: This metric indicates the total number of active domains (virtual machines) managed by libvirt.

Domain State Metrics

libvirt_domain_state_code: This metric provides the numeric code representing the current state of a domain (virtual machine) managed by libvirt. States can include running, paused, shutdown, etc.

libvirt_domain_info_state: This metric provides a textual description of the current state of a domain, such as “running”, “paused”, “shut off”, etc.

Domain Resource Metrics

libvirt_domain_info_cpu_time_seconds_total: This metric measures the total CPU time used by a domain (virtual machine) since it started, in seconds.

libvirt_domain_info_virtual_cpus: This metric indicates the number of virtual CPUs allocated to a domain.

libvirt_domain_info_maximum_memory_bytes: This metric represents the maximum memory allocated to a domain, in bytes.

Block Device Metrics

libvirt_domain_block_stats_read_requests_total: Total number of read requests issued to block devices.

libvirt_domain_block_stats_write_requests_total: Total number of write requests issued to block devices.

libvirt_domain_block_stats_read_bytes_total: Total number of bytes read from block devices

libvirt_domain_block_stats_write_bytes_total: Total number of bytes written to block devices

Network Interface Metrics

libvirt_domain_interface_stats_receive_bytes_total: Total number of bytes received by network interfaces .

libvirt_domain_interface_stats_transmit_bytes_total: Total number of bytes transmitted by network interfaces .

libvirt_domain_interface_stats_receive_drops_total: Total number of dropped receive packets by network interfaces .

libvirt_domain_interface_stats_transmit_drops_total: Total number of dropped transmit packets by network interfaces .

Network Interface Error Metrics

libvirt_domain_interface_stats_receive_errors_total: Total number of receive errors encountered by network interfaces. Receive errors typically indicate issues such as packet errors or failures in receiving network data.

libvirt_domain_interface_stats_transmit_errors_total: Total number of transmit errors encountered by network interfaces. Transmit errors indicate issues such as failures in sending network data or encountering errors during transmission.


Grafana Dashboard Panels

Libvirt Overview Row

Total VMs Panel

This panel displays the total number of virtual machines (VMs) managed by the Libvirt hypervisor.

  • Metrics Used: libvirt_domains_number

Running VMs Panel

This panel indicates the number of VMs currently in a running state.

  • Metrics Used: libvirt_domain_state_code

Shut Off VMs Panel

This panel shows the number of VMs that are powered off or shut down.

  • Metrics Used: libvirt_domain_info_state

vCPU Usage on VM Panel

This panel provides the CPU usage percentage for individual VMs, indicating how much of the virtual CPU resources are being utilized.

  • Metrics Used: libvirt_domain_info_cpu_time_seconds_total

No State VMs Panel

This panel shows the number of VMs that are in an undefined or unknown state.

  • Metrics Used: libvirt_domain_info_state

Suspend VMs Panel

This panel displays the number of VMs that are currently suspended or paused.

  • Metrics Used: libvirt_domain_info_state

Crashed VMs Panel

This panel indicates the number of VMs that have crashed.

  • Metrics Used: libvirt_domain_info_state

VM State Panel

This panel provides an overview of the current state of all VMs, such as running, paused, or shut down.

  • Metrics Used: libvirt_domain_info_state

Total vCPU on VM Panel

This panel shows the total number of virtual CPUs assigned to a VM.

  • Metrics Used: libvirt_domain_info_virtual_cpus

IOPS R/W on VM Panel

This panel displays the Input/Output Operations Per Second (IOPS) for read and write operations on a VM.

  • Metrics Used: libvirt_domain_block_stats_read_requests_total, libvirt_domain_block_stats_write_requests_total

Throughput R/W on VM Panel

This panel provides the read and write throughput in bytes for VMs, indicating the amount of data being transferred.

  • Metrics Used: libvirt_domain_block_stats_read_bytes_total, libvirt_domain_block_stats_write_bytes_total

Memory on VM Panel

This panel shows the amount of memory allocated to a VM.

  • Metrics Used: libvirt_domain_info_maximum_memory_bytes

RX/TX Throughput on VM Panel

This panel displays the network throughput in terms of received (RX) and transmitted (TX) bytes for VMs.

  • Metrics Used: libvirt_domain_interface_stats_receive_bytes_total, libvirt_domain_interface_stats_transmit_bytes_total

RX/TX Packets Drop on VM Panel

This panel indicates the rate of dropped packets for received (RX) and transmitted (TX) data on VMs.

  • Metrics Used: libvirt_domain_interface_stats_receive_drops_total, libvirt_domain_interface_stats_transmit_drops_total

CPU Row

vCPU Total Panel

This panel shows the total number of virtual CPUs (vCPUs) allocated to each VM. It helps in understanding the distribution of processing power among various VMs managed by the Libvirt hypervisor.

  • Metrics Used: libvirt_domain_info_virtual_cpus

vCPU Usage Panel

This panel displays the percentage of vCPU usage for each VM. It provides insights into how much of the allocated virtual CPU resources are being utilized by each VM.

  • Metrics Used: libvirt_domain_info_cpu_time_seconds_total

Memory Row

Total Panel

This panel shows the total amount of memory allocated to each VM. It helps in understanding how memory resources are distributed among various VMs managed by the Libvirt hypervisor.

  • Metrics Used: libvirt_domain_info_maximum_memory_bytes

Disk Row

IOPS Read Panel

This panel shows the read Input/Output Operations Per Second (IOPS) for each virtual disk (vda) of the VMs.

  • Metrics Used: libvirt_domain_block_stats_read_requests_total

IOPS Write Panel

This panel displays the write Input/Output Operations Per Second (IOPS) for each virtual disk (vda) of the VMs. It helps in understanding the disk write performance and identifying any bottlenecks in write operations.

  • Metrics Used: libvirt_domain_block_stats_write_requests_total

Throughput Read Panel

This panel shows the read throughput in bytes for each virtual disk (vda) of the VMs. It provides insights into the volume of data being read from the disk over time, which is useful for assessing the disk’s read performance.

  • Metrics Used: libvirt_domain_block_stats_read_bytes_total

Throughput Write Panel

This panel displays the write throughput in bytes for each virtual disk (vda) of the VMs. It provides insights into the volume of data being written to the disk over time, helping to assess the disk’s write performance.

  • Metrics Used: libvirt_domain_block_stats_write_bytes_total

Network Row

RX Throughput (Receive Throughput) Panel

This panel measures the rate at which data is received by the network interface, typically displayed in KiB (kibibytes) per second. It provides an overview of the incoming data traffic.

  • Metrics Used: libvirt_domain_interface_stats_receive_bytes_total

TX Throughput (Transmit Throughput) Panel

This panel measures the rate at which data is transmitted by the network interface, also displayed in KiB per second. It offers insights into the outgoing data traffic.

  • Metrics Used: libvirt_domain_interface_stats_receive_bytes_total

RX Packets (Receive Packets) Panel

This panel counts the number of packets received per second (p/s). It helps in understanding the volume of incoming packets to the network interface.

  • Metrics Used: libvirt_domain_interface_stats_receive_packets_total

TX Packets (Transmit Packets) Panel

This panel counts the number of packets transmitted per second (p/s). It helps in understanding the volume of outgoing packets from the network interface.

  • Metrics Used: libvirt_domain_interface_stats_transmit_packets_total

RX Packets Error Panel

This panel measures the number of errors encountered when receiving packets. A count of zero errors indicates a healthy network reception.

  • Metrics Used: libvirt_domain_interface_stats_receive_errors_total

TX Packets Error Panel

This panel measures the number of errors encountered when transmitting packets. A count of zero errors indicates a healthy network transmission.

  • Metrics Used: libvirt_domain_interface_stats_transmit_errors_total

RX Packets Drop Panel

This panel counts the number of received packets that were dropped. Zero drops indicate no loss of incoming packets.

  • Metrics Used: libvirt_domain_interface_stats_receive_drops_total

TX Packets Drop Panel

This panel counts the number of transmitted packets that were dropped. Zero drops indicate no loss of outgoing packets.

  • Metrics Used: libvirt_domain_interface_stats_transmit_drops_total

Data Exporter Row

VMs Stats Panel

The “VMs Stats” panel in the libvirt dashboard provides essential metrics for monitoring VMs. It includes VM names (Domain) and unique identifiers (UUID), along with details on allocated vCPUs (vCPU Total) and their current usage (vCPU Used). Memory allocation (Memory Total) and utilization information (Memory Used).

  • Metrics Used: libvirt_domain_info_virtual_cpus, libvirt_domain_info_cpu_time_seconds_total, libvirt_domain_info_maximum_memory_bytes