summaryrefslogtreecommitdiffstats
path: root/collectors/xenstat.plugin
diff options
context:
space:
mode:
authorPetr Vaněk <pv@excello.cz>2019-10-22 16:29:03 +0200
committerVladimir Kobal <vlad@prokk.net>2019-10-22 17:29:03 +0300
commit31116639d6a9f9fd731502150207371b892dc4e6 (patch)
tree4c3dcdfa1cbffbd348bd8badfe026c800e131f46 /collectors/xenstat.plugin
parent509882ea3b533114ea6e271b0a2281e5f9dd092e (diff)
xenstat.plugin: check xenstat_vbd_error presence (#7103)
The xenstat_vbd_error function is going to be part of the xen 4.13 release. The workaround here is to check if the function is already present in configuration phase and set vbd_m->error always to 0 if xenstat_vbd_error does not exist.
Diffstat (limited to 'collectors/xenstat.plugin')
-rw-r--r--collectors/xenstat.plugin/xenstat_plugin.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/collectors/xenstat.plugin/xenstat_plugin.c b/collectors/xenstat.plugin/xenstat_plugin.c
index 873b818041..fadd218c55 100644
--- a/collectors/xenstat.plugin/xenstat_plugin.c
+++ b/collectors/xenstat.plugin/xenstat_plugin.c
@@ -333,7 +333,11 @@ static int vbd_metrics_collect(struct domain_metrics *d, xenstat_domain *domain)
return 1;
}
+#ifdef HAVE_XENSTAT_VBD_ERROR
vbd_m->error = xenstat_vbd_error(vbd);
+#else
+ vbd_m->error = 0;
+#endif
vbd_m->oo_reqs = xenstat_vbd_oo_reqs(vbd);
vbd_m->rd_reqs = xenstat_vbd_rd_reqs(vbd);
vbd_m->wr_reqs = xenstat_vbd_wr_reqs(vbd);