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

unable to build on CentOS Linux release 7.5.1804 (Core) #28

Closed jotishm closed 4 years ago

jotishm commented 4 years ago

I am unable to complete the build on CentOS Linux release 7.5.1804 (Core).

I tied following the instructions but seeing below error:

make go build -i -ldflags "-X github.com/elastic/beats/libbeat/version.buildTime=2020-05-10T21:00:06Z -X github.com/elastic/beats/libbeat/version.commit=8cdb6f8f6994100b312a3095cf0fd4493fb9f62e" # github.com/ebay/nvidiagpubeat ./main.go:31:15: undefined: cmd.GenRootCmd make: *** [libbeat] Error 2

Able to resolve go path:

which go /usr/local/go/bin/go

jotishm commented 4 years ago

I was able to fix this issue by installing latest version of go using following script:

#!/bin/bash
cd /tmp
curl -LO https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz
tar -C /usr/local/ -xvzf go1.14.2.linux-amd64.tar.gz
echo -e "#Updating go path" >> /etc/profile
echo -e 'PATH="/usr/local/go/bin/:${PATH}"' >> /etc/profile
echo -e "export PATH" >> /etc/profile
source /etc/profile