telegraf
telegraf copied to clipboard
libvirt plugin
Hi
I'd really like to see a libvirt stats plugin. There is a golang project here https://github.com/rgbkrk/libvirt-go
BR, Stuart
I +1 this. There was a PR some time ago with basic metrics, but Cameron Sparr rejected it because that would add libvirt as a dependency for everyone. I think there's been no further progress there even though we now have libsensors as an external dependency . If the original requestor has given up, I can take a look at it and start working on something. I have some knowledge of libvirt, altough I have never done any Go development, but from what i saw it looks like a combo of C/C++ and Python, so it should be a piece of cake :)
for the record, I did not reject the PR, I asked the submitter to re-submit it and never got a response.
If someone is willing to re-submit I'd be happy to merge (see https://github.com/influxdata/telegraf/pull/357)
@sparrc Over the weekend i did some work on rebasing the libvirt plugin, but i had a question. I asked it in the original PR, #357 , but it's closed and i think you don't get notified about it. Would you like to continue the discussions here?
sure we can discuss here,
As to your question, what is the general availability and usage of the two different versions of libvirt?
According to https://github.com/rgbkrk/libvirt-go/blob/master/README.md 's OS compatibility matrix, some older OS'es ' default version, like Debian 6, Ubuntu before 14.04, RHEL and CentOS 5 & 6 are incompatible. Old, but still used(especially CentOS and RHEL). Personally i don't think there are a lot of people running on top of a ~5 year old version of libvirt.
Im happy to help out if needed
@stuartbfox, thanks. For now it's fine - i just had to update the doc and the import paths. I'll probably add a few metrics, but later on, you're welcome to expand the plugin.
@sofixa have you made any progress on this plugin?
I would really like to see a libvirt plugin in telegraf. Vital information for any virtualized / cloud environment. Especially VM CPU/RAM/NIC/DISK stats.
I started a small POC for this using the digital ocean library. It is rough and the cpu stuff is not correct, as I have just been playing around with the library today. The only place I can find for network data is in the XML. Thoughts? Suggestions? Just a really rough POC.
https://gist.github.com/dahendel/62362a95cb40b429936dceb26a13cccb
In #2560 there has been a little discussion about the digitalocean/go-libvirt library, I think we would prefer to use it at some point since then we could avoid running a subprocess.
closing due to inactivity
I would like to see this come back as an external execd plugin, which would avoid the dependency. Is this still of interest, or have people moved on to other things?
I am actively using this in a production environment. I have rewritten the plugin, though, to use
github.com/libvirt/libvirt-go
and include only metrics that are necessary for us.
@Sverik - do you have this plugin in an external repo? If so would you be willing to add it to our list of list of external plugins?
Thanks!
@powersj , ooh, interesting, I didn't know about external plugins! So no, at the moment it's built into my custom build of Telegraf, but I'll think about externalising and publishing the plugin.
Well, that port to execd shim was easy :D Anyway, here's the link: telegraf-input-libvirt it's a bit specific to my use-case, though. Still, could be useful for someone.