On Mon, Feb 15, 2021 at 09:19:16AM -0700, Aaron Bieber wrote:
> 
> Claudio Jeker writes:
> 
> > This is my attempt to update node_exporter.
> > Since prometheus switched to go mod I decided to switch the port to.
> >
> > Now I did not want to fight with the lang/go module and dropped building
> > the port with promu. Now this works fine the only issue is that the
> > version and build info is missing in node_exporter --version.
> 
> FWIW you can set the version by adding the below to the Makefile:
> 
>   MODGO_LDFLAGS =    -X 
> github.com/prometheus/common/version.Version=${MODGO_VERSION}
> 

I added something similar that also sets the builduser.

> >
> > For a simple system info collector the amount of dependencies required is
> > just insane. If this is the future of golang then I will move back under
> > my rock.
> 
> Ya, it's unfortunate that people are so quick to reach for
> dependencies. It's defiantly not a unique-to-golang thing though!
> 
> Anyway - this works on my machine just fine so OK abieber@

One issue I found is that for amd64 node_memory_cache_bytes is always 0.
This is because for amd64 node_exporter no longer uses cgo and just fails
to load the needed data for the size of the buffer cache.

-- 
:wq Claudio

Reply via email to