parent
dde59014b8
commit
6aef20f8d8
12 changed files with 88 additions and 52 deletions
|
|
@ -168,13 +168,15 @@ func (c *hwMonCollector) updateHwmon(ch chan<- prometheus.Metric, dir string) (e
|
|||
|
||||
_, sensorType, _, _ := explodeSensorFilename(sensor)
|
||||
|
||||
labels := []string{hwmonName, sensor}
|
||||
if labelText, ok := sensorData["label"]; ok {
|
||||
label := cleanMetricName(labelText)
|
||||
if label != "" {
|
||||
sensor = label
|
||||
desc := prometheus.NewDesc("node_hwmon_sensor_label", "Label for given chip and sensor",
|
||||
[]string{"chip", "sensor", "label"}, nil)
|
||||
ch <- prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, 1.0, hwmonName, sensor, label)
|
||||
}
|
||||
}
|
||||
labels := []string{hwmonName, sensor}
|
||||
|
||||
if sensorType == "beep_enable" {
|
||||
value := 0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue