From 2e31937b1e4c422a40cd02a45b4aa1abec8edcdc Mon Sep 17 00:00:00 2001 From: Xuhui Zhu Date: Fri, 23 Aug 2024 16:34:23 -0400 Subject: [PATCH] restruct code Signed-off-by: Xuhui Zhu --- collector/hwmon_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/hwmon_linux.go b/collector/hwmon_linux.go index 3b0f0a2aef..e90ce7e98e 100644 --- a/collector/hwmon_linux.go +++ b/collector/hwmon_linux.go @@ -357,7 +357,7 @@ func (c *hwMonCollector) updateHwmon(ch chan<- prometheus.Metric, dir string) er if sensorType == "freq" && element == "input" { if label, ok := sensorData["label"]; ok { sensorLabel := cleanMetricName(label) - desc := prometheus.NewDesc("node_hwmon_freq_hertz", "Hardware monitor for GPU frequency in MHz", hwmonLabelDesc, nil) + desc := prometheus.NewDesc(name+"_freq_mhz", "Hardware monitor for GPU frequency in MHz", hwmonLabelDesc, nil) ch <- prometheus.MustNewConstMetric( desc, prometheus.GaugeValue, parsedValue/1000000.0, append(labels[:len(labels)-1], sensorLabel)...) }