Monitoring Linux KVM hypervisor
You can monitor Linux KVM hypervisor infrastructure with the Linux KVM hypervisor sensor, which provides insights into the health and performance of both the virtual machines and the underlying host infrastructure. The Linux KVM hypervisor sensor is automatically deployed, configured, and installed after you install the Instana agent. You can then view the metrics that are related to Linux KVM hypervisor in the Instana UI.
The Linux KVM hypervisor monitoring is an optional feature in Instana and is disabled by default. To enable this optional feature, check the following sections depending on the Instana deployment:
Supported versions and support policy
Instana supports the KVM sensor on Red Hat Enterprise Linux 9, IBM z/OS, and any linux-based systems.
Prerequisites
Before you enable the Linux KVM hypervisor sensor for monitoring, complete the following prerequisites:
- Install the Instana agent. For more information, see Installing host agents.
- Obtain root access to monitor Linux KVM hypervisor. Root access is required because Instana monitors VM and network by using privileged APIs provided by the
libvirtlibrary. - Enable the Linux KVM hypervisor monitoring feature. See SaaS, Self-Hosted Custom Edition (Kubernetes or Red Hat OpenShift Container Platform) , and Self-Hosted Classic Edition (Docker) .
- Install the virtualisation library
libvirt
libvirt-java fails, then a secondary mechanism of collecting metrics by using the virsh CLI, provided by the libvirt library, is used. In case where virsh is used, the agent must have permission to execute this program.Installing the virtualisation library
Before you the enable Linux KVM hypervisor sensor, install the virtualisation library libvirt, run the following commands to install libvirt:
bridge-utils package on zLinux, enable the epel repo.# This step is a prerequisite for installing EPEL.
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-s390x-rpms
# Install the EPEL package
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
# Installing libvirt and required dependencies.
sudo dnf install qemu-kvm libvirt virt-install virt-viewer bridge-utils
# Start the libvirt service to enable data collection
sudo systemctl start libvirtd
# Enable the libvirt service to start on boot
sudo systemctl enable libvirtd
Enabling Linux KVM hypervisor sensor
After the Linux KVM monitoring feature flag is enabled, you need to enable the Linux KVM hypervisor sensor. To enable the sensor, use the following configuration in the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml. You can disable it by setting the enabled property to false.
com.instana.plugin.linuxkvmhypervisor:
enabled: true # To disable the sensor set to false
poll_rate: 10 # In seconds
availabilityZone: 'Default Zone' # Zone Name
After you enable the sensor, it collects metrics for the Linux KVM host and virtual machines.
Configuring Linux KVM hypervisor sensor
By default, the agent collects Linux KVM host and virtual machine metrics every 10 seconds. To change the interval, update the poll_rate property in the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml.
Viewing metrics
To view the metrics, complete the following steps:
- From the navigation menu in the Instana UI, click Platforms > Linux KVM Hypervisor.
- On the Linux KVM Hypervisor dashboard, click a Linux KVM host.
- To view a summary of virtual machines that are created on the host, click the Virtual machines tab.
- Select a virtual machine to view its detailed dashboard.
You can view the following metrics and data.
Host data
The Linux KVM dashboard displays the following details:
- Host name
- Number of virtual machines
- CPU utilization
- Memory utilization
Each host dashboard includes the Summary and Virtual machines tabs.
The Summary tab on each host dashboard displays the following details:
- IP address
- Operating System running on the host
- Number of virtual machines
- Version of libvirt installed on the host
- CPU utilization in percentage
- Memory utilization in percentage
- A chart with the CPU utilization by guest VMS
- A chart with the total, used, and free memory that is allocated to the hypervisor on the host
- A chart with the bytes sent, received, and total by guest VMS
- A table listing attached storage media including device name, state, free space available, and total size allocated
The Summary tab on each virtual machine dashboard displays the following details:
- Name of the virtual machine
- Operating system running on the virtual machine. This value is inferred from the URL that is provided in the metadata of the guest OS image.
- State
- CPU utilization in percentage
- Memory utilization in percentage
- A chart with the CPU utilization by the virtual machine
- A chart with the total, used, and free memory that is allocated to the virtual machine
- A chart with the bytes sent, received, and total by the virtual machine
Performance metrics
The Linux KVM sensor collects the following performance metrics from the Linux KVM hypervisor host:
| Data point | Description | Granularity |
|---|---|---|
| CPU utilization | Mean utilization of all virtual CPUs | 10 seconds |
| Memory utilization | Mean utilization of memory on all virtual machines | 10 seconds |
| Total memory | Total memory that is allocated to all virtual machines | 10 seconds |
| Used memory | Total memory that is utilized by all virtual machines | 10 seconds |
| Free memory | Amount of memory that is available for use across all virtual machines | 10 seconds |
| Total bytes sent | Total number of bytes that is sent by all virtual machines | 10 seconds |
| Total bytes received | Total number of bytes that is received by all virtual machines | 10 seconds |
| Total bytes | Total number of bytes that is sent and received by all virtual machines | 10 seconds |
| Received error count | Total number of error packets that are received | 10 seconds |
| Received drop count | Total number of packets that dropped during reception | 10 seconds |
| Transmitted error count | Total number of error packets during transmission | 10 seconds |
| Transmitted drop count | Total number of packets that dropped during transmission | 10 seconds |
The Linux KVM hypervisor sensor collects the following performance metrics for each Linux KVM virtual machine:
| Data point | Description | Granularity |
|---|---|---|
| CPU utilization | Mean utilization of virtual CPUs | 10 seconds |
| Memory utilization | Mean utilization of RAM | 10 seconds |
| Total memory | Total memory that is alocated to this virtual machine | 10 seconds |
| Used memory | Total memory that is utilized by this virtual machine | 10 seconds |
| Free memory | Amount of memory that is available for use on this virtual machine | 10 seconds |
| Total bytes sent | Total number of bytes that is sent by this virtual machine | 10 seconds |
| Total bytes received | Total number of bytes that is received by this virtual machine | 10 seconds |
| Total bytes | Total number of bytes that is sent and received by this virtual machine | 10 seconds |
| Received error count | Total number of error packets that are received | 10 seconds |
| Received drop count | Total number of packets that dropped during reception | 10 seconds |
| Transmitted error count | Total number of error packets during transmission | 10 seconds |
| Transmitted drop count | Total number of packets that dropped during transmission | 10 seconds |