telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

libvirt plugin

Open stuartbfox opened this issue 9 years ago • 17 comments

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

stuartbfox avatar Feb 13 '16 01:02 stuartbfox

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 :)

sofixa avatar Feb 13 '16 19:02 sofixa

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 avatar Feb 14 '16 09:02 sparrc

@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?

sofixa avatar Apr 25 '16 08:04 sofixa

sure we can discuss here,

As to your question, what is the general availability and usage of the two different versions of libvirt?

sparrc avatar Apr 25 '16 15:04 sparrc

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.

sofixa avatar Apr 25 '16 15:04 sofixa

Im happy to help out if needed

stuartbfox avatar Apr 26 '16 06:04 stuartbfox

@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 avatar Apr 26 '16 06:04 sofixa

@sofixa have you made any progress on this plugin?

stuartbfox avatar Jun 11 '16 17:06 stuartbfox

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.

hydro-b avatar Jul 07 '17 08:07 hydro-b

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

dahendel avatar Dec 14 '17 20:12 dahendel

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.

danielnelson avatar Dec 15 '17 00:12 danielnelson

closing due to inactivity

darinfisher avatar Jul 28 '20 17:07 darinfisher

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?

ssoroka avatar Aug 14 '20 17:08 ssoroka

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 avatar Nov 18 '20 07:11 Sverik

@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 avatar Sep 13 '22 20:09 powersj

@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.

Sverik avatar Sep 14 '22 10:09 Sverik

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.

Sverik avatar Sep 16 '22 14:09 Sverik