Greetings,
please see the libvirt plugin patch which adds io_error metric for virtual disk
devices.
I guess it makes sense for xen hypervisor only:
http://old-list-archives.xen.org/archives/html/xen-devel/2006-06/msg00812.html
Thank you,
Aleh
--- collectd-5.0.3/src/libvirt.c 2012-05-08 10:39:09.000000000 +0000
+++ collectd-5.0.3/src/libvirt.c 2012-05-08 10:41:57.000000000 +0000
@@ -216,6 +216,25 @@
}
static void
+submit_derive (const char *type, derive_t v0,
+ virDomainPtr dom, const char *devname)
+{
+ value_t values[1];
+ value_list_t vl = VALUE_LIST_INIT;
+
+ init_value_list (&vl, dom);
+
+ values[0].derive = v0;
+ vl.values = values;
+ vl.values_len = 1;
+
+ sstrncpy (vl.type, type, sizeof (vl.type));
+ sstrncpy (vl.type_instance, devname, sizeof (vl.type_instance));
+
+ plugin_dispatch_values (&vl);
+} /* void submit_derive */
+
+static void
submit_derive2 (const char *type, derive_t v0, derive_t v1,
virDomainPtr dom, const char *devname)
{
@@ -462,6 +481,11 @@
submit_derive2 ("disk_octets",
(derive_t) stats.rd_bytes, (derive_t) stats.wr_bytes,
block_devices[i].dom, block_devices[i].path);
+
+ if (stats.errs != -1)
+ submit_derive ("io_errors",
+ (derive_t) stats.errs,
+ block_devices[i].dom, block_devices[i].path);
} /* for (nr_block_devices) */
/* Get interface stats for each domain. */
--- collectd-5.0.3/src/types.db 2012-05-08 11:26:58.000000000 +0000
+++ collectd-5.0.3/src/types.db 2012-05-08 11:25:59.000000000 +0000
@@ -76,6 +76,7 @@
if_rx_errors value:DERIVE:0:U
if_tx_errors value:DERIVE:0:U
invocations value:DERIVE:0:U
+io_errors value:DERIVE:0:U
io_octets rx:DERIVE:0:U, tx:DERIVE:0:U
io_packets rx:DERIVE:0:U, tx:DERIVE:0:U
ipt_bytes value:DERIVE:0:U
_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd