eBay / nvidiagpubeat

nvidiagpubeat is an elastic beat that uses NVIDIA System Management Interface (nvidia-smi) to monitor NVIDIA GPU devices and can ingest metrics into Elastic search cluster, with support for both 6.x and 7.x versions of beats. nvidia-smi is a command line utility, based on top of the NVIDIA Management Library (NVML), intended to aid in the management and monitoring of NVIDIA GPU devices.
https://github.com/eBay/nvidiagpubeat
Apache License 2.0
54 stars 22 forks source link

Use new method for RootCmd #19

Closed tomkirkhawkeye closed 5 years ago

tomkirkhawkeye commented 5 years ago

This fixes compilation when targetting 7.x + versions of libbeat

deepujain commented 5 years ago

Thank you for PR. I verified the changes and they work with ES 7.2

git clone https://github.com/elastic/beats ${GOPATH}/src/github.com/elastic/beats --branch 7.2
  1. What do you want to do for users with ES < 7.x ?
tomkirkhawkeye commented 5 years ago

I wasn't really sure the best way to handle it, I'm not very familiar with go so not sure if there is some way we could branch at compile time depending on version? Any ideas?

jerrac commented 5 years ago

I was able to use tomkirkhawkeye:update-to-7.x to get nvidiagpubeat working on my local system. Thanks!

I'd suggest tagging a release for each version. So what I would do is tag where we're at now as v6.8.1 (or whatever version of https://github.com/elastic/beats you last tested nvidiagpubeat with) then merge this pull request in and tag it as v7.2.0.

Whenever breaking changes come in, add another tag. Just keep a table, or something, in the readme stating which tags should work with which versions of elastic/beats.

Or something like that. I'm not exactly experienced with versioning anything, so I'm just throwing out some ideas. :\

deepujain commented 5 years ago

@jerrac I like the idea of tagging for every version.

deepujain commented 5 years ago

https://github.com/eBay/nvidiagpubeat/pull/22 is the fix.