Skip to content

Commit ab3e6be

Browse files
committed
fix: cpufreq collector enable
Signed-off-by: hys <[email protected]>
1 parent 38d32a3 commit ab3e6be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collector/cpu_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func (c *cpuCollector) updateInfo(ch chan<- prometheus.Metric) error {
224224
cpuFreqEnabled, ok := collectorState["cpufreq"]
225225
if !ok || cpuFreqEnabled == nil {
226226
c.logger.Debug("cpufreq key missing or nil value in collectorState map")
227-
} else if !*cpuFreqEnabled {
227+
} else if *cpuFreqEnabled {
228228
for _, cpu := range info {
229229
ch <- prometheus.MustNewConstMetric(c.cpuFrequencyHz,
230230
prometheus.GaugeValue,

0 commit comments

Comments
 (0)