Commit graph

9 commits

Author SHA1 Message Date
Daniel Swarbrick 3fb5f70b0c Drop redundant GOOS build tags if already in filename
Drop redundant GOOS build tags at start of file if the constraint is
already specified by the filename, e.g. foo_GOOS.go or
foo_GOOS_GOARCH.go, avoiding potential confusion in future.

cf. https://pkg.go.dev/cmd/go#hdr-Build_constraints

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2023-08-08 14:30:39 +02:00
Ben Kochie 3cd9b163e6
Optimize cpufreq collector
Move metric descriptiions to package vars to avoid allocating them every
time `NewCPUFreqCollector()` is called.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-01-28 11:42:02 +01:00
Julien Pivotto 68a6c78c0d
Update go to 1.17 (#2159)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-10-03 13:35:24 +02:00
Ben Kochie 839c2d557f
Update go-kstat location
Move go-kstat to the new github.com/illumos/go-kstat location.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-07-06 11:44:18 +02:00
Ben Kochie 3bc9a93c20
Add ErrorLog plumbing to promhttp
Fix the error logging of the promhttp handler by connecting it to the
promlog setup.
* Switch to go-kit/log.
* Cleanup CHANGELOG.

Fixes: https://github.com/prometheus/node_exporter/issues/1886

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-06-03 10:47:41 +02:00
Julius Volz d05aac43e4 Fix capitalization of CPU acronym throughout
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-09-03 23:34:33 +02:00
Peter Tribble e7a27366a0 Fix Solaris build (typos in function names) (#1522)
Signed-off-by: Peter Tribble <peter.tribble@gmail.com>

Co-authored-by: Ben Kochie <superq@gmail.com>
2020-01-24 18:06:10 +01:00
Ben Ye 2477c5c67d switch to go-kit/log (#1575)
Signed-off-by: yeya24 <yb532204897@gmail.com>
2019-12-31 17:19:37 +01:00
Paul Gier cc847f2f44 collector/cpu: split cpu freq metrics into separate collector (#1253)
The cpu frequency information is not always needed and/or available.
This change allows the cpu frequency metrics to be enabled/disabled
separately from the other cpu metrics, and also prevents a frequency
metric failure (such as a parse error) from failing the main cpu
collector.

Fixes #1241

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-02-19 17:22:54 +01:00