Difference between revisions of "Plugin:virt"
MichaelForde (talk | contribs) |
m (Update plugin conf link: libvirt->virt) |
||
Line 7: | Line 7: | ||
| Copyright=''2007–2008'' Red Hat Inc.<br />''2007–2008'' Florian octo Forster | | Copyright=''2007–2008'' Red Hat Inc.<br />''2007–2008'' Florian octo Forster | ||
| License={{GPLv2}} | | License={{GPLv2}} | ||
− | | Manpage={{Manpage|collectd.conf|5| | + | | Manpage={{Manpage|collectd.conf|5|plugin_virt}} |
}} | }} | ||
The '''virt plugin''' uses the virtualization API [http://libvirt.org/ libvirt], created by RedHat's [http://et.redhat.com/ Emerging Technology group], to gather statistics about virtualized guests on a system. This way, you can collect CPU, network interface and block device usage for each guest <em>without</em> installing ''collectd'' on the guest systems. Because the statistics are received from the hypervisor directly, this works not only with para-virtualized hosts, but with hardware virtualized machines, too. | The '''virt plugin''' uses the virtualization API [http://libvirt.org/ libvirt], created by RedHat's [http://et.redhat.com/ Emerging Technology group], to gather statistics about virtualized guests on a system. This way, you can collect CPU, network interface and block device usage for each guest <em>without</em> installing ''collectd'' on the guest systems. Because the statistics are received from the hypervisor directly, this works not only with para-virtualized hosts, but with hardware virtualized machines, too. |
Latest revision as of 14:20, 27 July 2020
virt plugin | |
---|---|
Type: | read |
Callbacks: | config, init, read, shutdown |
Status: | supported |
First version: | 4.3 |
Copyright: | 2007–2008 Red Hat Inc. 2007–2008 Florian octo Forster |
License: | GPLv2 |
Manpage: | collectd.conf(5) |
List of Plugins |
The virt plugin uses the virtualization API libvirt, created by RedHat's Emerging Technology group, to gather statistics about virtualized guests on a system. This way, you can collect CPU, network interface and block device usage for each guest without installing collectd on the guest systems. Because the statistics are received from the hypervisor directly, this works not only with para-virtualized hosts, but with hardware virtualized machines, too.
The used libvirt library provides abstracted access to a number of virtualization techniques. At the moment (April 2010), the Xen, Qemu and KVM backends are able to provide the collected statistics.
Other statistics than the ones listed above can not be collected through this plugin. For more detailed statistics you will need to install collectd on each guest and use the Network plugin to transmit the statistics.
The plugin can be configured to only collect specific domains, block devices or interfaces. For a full description of available options please refer to the collectd.conf(5) manual page.
Synopsis
The virt plugin collects statistics by using virtualization API. Metrics are gathered directly from the hypervisor on a host system, which means that collectd doesn’t have to be installed and configured on a guest system. Extended metrics can be enabled with virt plugin configuration option. Here is an example of the plugin configuration section of collectd.conf file:
<Plugin "virt"> Connection "xen:///" RefreshInterval 60 #Domain "name" #BlockDevice "name:device" #InterfaceDevice "name:interface" #IgnoreSelected false HostnameFormat "name" ExtraStats "cpu_util disk_err domain_state fs_info job_stats_background perf vcpupin" </Plugin>
Parameters
Name |
Selectors |
Description |
Comment |
---|---|---|---|
ExtraStats |
disk_err domain_state fs_info job_stats_background job_stats_completed perf vcpupin |
Defines whether additional statistics should be collected. By default no extra statistics are gathered, preserving the previous behavior of the plugin. |
The argument is a space-separated list of selectors |
Metrics
Technology/ Category |
Metric/Feature Name |
Date Type |
Format Example |
Collectd Release |
Collectd Plugin |
Description |
Dependencies |
Limitations |
Comments |
---|---|---|---|---|---|---|---|---|---|
Virt |
cpu_affinity |
Int |
None |
5.8 |
virt |
Gets the vcpu affinity details |
|
|
Gets the data from hypervisor |
Virt |
disk_octets |
Int |
None |
5.8 |
virt |
Gets the number of read/write bytes performed on a disk partition |
|
|
Gets the data from hypervisor |
Virt |
disk_time |
Int, Int |
None |
5.8 |
virt |
Gets the Guest disk time |
|
|
Gets the data from hypervisor |
Virt |
disk_ops |
Int |
None |
5.8 |
virt |
Gets the number of read and write requests on a disk partition |
|
|
Gets the data from hypervisor |
Virt |
if_dropped |
Int |
None |
5.8 |
virt |
Gets the number of packets dropped on vNIC interfaces |
|
|
Gets the data from hypervisor |
Virt |
if_errors |
Int |
None |
5.8 |
virt |
Gets the number of errored packets on vNIC interfaces |
|
|
Gets the data from hypervisor |
Virt |
if_octets |
Int |
None |
5.8 |
virt |
Gets the number of bytes transmitted/recieved on vNIC interfaces |
|
|
Gets the data from hypervisor |
Virt |
if_packets |
Int |
None |
5.8 |
virt |
Gets the total number of packets transmitted/recieved on vNIC interfaces |
|
|
Gets the data from hypervisor |
Virt |
memory-actual |
Int |
None |
5.8 |
virt |
Gets the current memory for the VM or target |
|
|
Gets the data from hypervisor |
Virt |
memory-last |
Int |
None |
5.8 |
virt |
Gets the last piece of memory of a guest (memory remains after add up guest RAM, guest video RAM, and memory overhead of QEMU) |
|
|
Gets the data from hypervisor |
Virt |
memory-rss |
Int |
None |
5.8 |
virt |
Gets the resident set size memory (memory allocated to a process in RAM) |
|
|
Gets the data from hypervisor |
Virt |
memory-total |
Int |
None |
5.8 |
virt |
Gets the total guest RAM |
|
|
Gets the data from hypervisor |
Virt |
percent-virt_cpu_total |
Float |
None |
5.8 |
virt |
Gets the percentage of total available CPU |
|
|
Gets the data from hypervisor |
Virt |
ps_cputime |
Int |
None |
5.8 |
virt |
Gets the cpu time (Say its sum of the user time,system time and guest time). IT might be used to calculate the vCPU usage |
|
|
Gets the data from hypervisor |
Virt |
total_requests-flush |
Int |
None |
5.8 |
virt |
Gets the total flush rquests of the block device or guest |
|
|
Gets the data from hypervisor |
Example graphs
Example graphs showing primarily (virt) cpu usage of two guests - services and webapps.
History
This plugin was originally called libvirt, which caused problems with collectd's build system due to the lib
prefix. It has been renamed to simply virt in version 5.5.