virt.c modifications to bring it in accordance with "octo" comments
[collectd.git] / src / collectd.conf.pod
index 1310c50..64be99e 100644 (file)
@@ -7773,6 +7773,8 @@ option is set to 0, refreshing is disabled completely.
 
 =item B<BlockDevice> I<name:dev>
 
+=item B<BlockDeviceFormat> B<source>|B<target>
+
 =item B<InterfaceDevice> I<name:dev>
 
 =item B<IgnoreSelected> B<true>|B<false>
@@ -7798,6 +7800,55 @@ Example:
 Ignore all I<hdb> devices on any domain, but other block devices (eg. I<hda>)
 will be collected.
 
+If I<BlockDeviceFormat> is set to B<target>, then the device names will be the ones
+in the I<target> node for the device in the XML definition of the domain. The
+default is B<target>. This is the behavior before adding the option.
+
+If I<BlockDeviceFormat> is set to B<source>, then the device names will be the ones
+in the I<source> node for the device in the XML definition of the domain.
+
+Example:
+
+If the domain XML have the following device defined:
+
+   <disk type='block' device='disk'>
+      <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
+      <source dev='/var/lib/libvirt/images/image1.qcow2'/>
+      <target dev='sda' bus='scsi'/>
+      <boot order='2'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+
+setting 
+
+        BlockDeviceFormat target
+
+will name the device in the graph as C<sda> 
+
+setting
+       BlockDeviceFormat source
+
+will name the device in the graph as C<var_lib_libvirt_images_image1.qcow2>
+
+These names will also be part of the RRD filename.
+
+=item B<BlockDeviceFormatBasename> B<false>|B<true>
+
+I<BlockDeviceFormatBasename> - this option is honored if and only if 
+option I<BlockDeviceFormat> is set to B<source>. If set to B<true> then 
+only the last part of the path will be used for device name and naming the
+RRD file.
+
+Example: 
+
+if the device path (source tag) is: C</var/lib/libvirt/images/image1.qcow2>
+
+setting:
+       BlockDeviceFormatBasename true
+
+will set the device name to: C<image1.qcow2>
+
 =item B<HostnameFormat> B<name|uuid|hostname|...>
 
 When the virt plugin logs data, it sets the hostname of the collected data