[collectd] [RFC] virt2: a rewrite of the virt plugin

Francesco Romani fromani at redhat.com
Thu Nov 10 14:44:17 CET 2016


Hi everyone,

I'm one of the developers of the oVirt project[1] and in the last couple of weeks I've been working
on a reimplementation of the virt plugin, temporarily called virt2[2] -
please note that _at the moment_ my changes are against 5.5, but the final pull request will of course be
against master.

I did so because we (as oVirt team) want to use collectd for the monitoring for our future releases[3],
and we found the existing plugin lacking some features we need - we already filed an issue about that[4].

Why starting a new plugin instead of patching the old one? :)
1. it was easier :)
2. the old plugin required a large amount of refactoring anyway (as hinted in [4] - and I fully agree)
3. oVirt doesn't just need what we documented in [4]. We also have the problem of dealing
with libvirt domains potentially blocked on I/O over shared storage (oVirt always require shared storage),
and we need to bake this support in the monitoring code. I'll elaborate about this issue and how I addressed it
in a later, separate mail. However, the final result is that I had to rewrite all the libvirt queries,
and I took the chance to use the recently added libvirt bulk stats API[5].

At the moment, there is little overlap between the current "virt" plugin and my new "virt2" plugin;
for example I didn't implement those options:
    "Domain", "BlockDevice", "InterfaceDevice", "IgnoreSelected", "HostnameFormat", "InterfaceFormat", "PluginInstanceFormat"
I did so to speed up my development, I don't have any real reason to drop them, so I can add them back.

What I'd like to ask with this email is what's the best way to submit a pull request.
What's best for the project and easier for the reviewers and maintainers?

a. add a new plugin alongside the old one?
b. rewrite the old one?
c. something else?

Please note that my code is *not* yet ready for a proper pull request, but it's approaching that stage.

Any comment is strongly welcome!

Best regards,

+++

[1] http://www.ovirt.org/
[2] https://github.com/mojaves/collectd/blob/virt2-5.5/src/virt2.c
[3] https://sradcoblog.wordpress.com/2016/07/19/ovirt-metrics-elk/
[4] https://github.com/collectd/collectd/issues/1945
[5] http://libvirt.org/html/libvirt-libvirt-domain.html#virDomainListGetStats

-- 
Francesco Romani
Red Hat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani



More information about the collectd mailing list