mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-02-21 03:25:57 -08:00
Fix debug log in cpu collector (#2857)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
4abf2c972e
commit
12f1744e79
|
@ -205,7 +205,7 @@ func (c *cpuCollector) updateInfo(ch chan<- prometheus.Metric) error {
|
||||||
|
|
||||||
cpuFreqEnabled, ok := collectorState["cpufreq"]
|
cpuFreqEnabled, ok := collectorState["cpufreq"]
|
||||||
if !ok || cpuFreqEnabled == nil {
|
if !ok || cpuFreqEnabled == nil {
|
||||||
level.Debug(c.logger).Log("cpufreq key missing or nil value in collectorState map", err)
|
level.Debug(c.logger).Log("msg", "cpufreq key missing or nil value in collectorState map")
|
||||||
} else if !*cpuFreqEnabled {
|
} else if !*cpuFreqEnabled {
|
||||||
for _, cpu := range info {
|
for _, cpu := range info {
|
||||||
ch <- prometheus.MustNewConstMetric(c.cpuFrequencyHz,
|
ch <- prometheus.MustNewConstMetric(c.cpuFrequencyHz,
|
||||||
|
|
Loading…
Reference in a new issue