@@ -16,6 +16,7 @@ import (
16
16
var (
17
17
ChassisSubsystem = "chassis"
18
18
ChassisLabelNames = []string {"resource" , "chassis_id" }
19
+ ChassisModel = []string {"resource" , "chassis_id" , "manufacturer" , "model" , "part_number" }
19
20
ChassisTemperatureLabelNames = []string {"resource" , "chassis_id" , "sensor" , "sensor_id" }
20
21
ChassisFanLabelNames = []string {"resource" , "chassis_id" , "fan" , "fan_id" , "fan_unit" }
21
22
ChassisPowerVoltageLabelNames = []string {"resource" , "chassis_id" , "power_voltage" , "power_voltage_id" }
41
42
nil ,
42
43
),
43
44
},
45
+ "chassis_model_info" : {
46
+ desc : prometheus .NewDesc (
47
+ prometheus .BuildFQName (namespace , ChassisSubsystem , "model_info" ),
48
+ "organization responsible for producing the chassis, the name by which the manufacturer generally refers to the chassis, and a part number assigned by the organization that is responsible for producing or manufacturing the chassis" ,
49
+ ChassisModel ,
50
+ nil ,
51
+ ),
52
+ },
44
53
"chassis_temperature_sensor_state" : {
45
54
desc : prometheus .NewDesc (
46
55
prometheus .BuildFQName (namespace , ChassisSubsystem , "temperature_sensor_state" ),
@@ -343,6 +352,12 @@ func (c *ChassisCollector) Collect(ch chan<- prometheus.Metric) {
343
352
ch <- prometheus .MustNewConstMetric (c .metrics ["chassis_state" ].desc , prometheus .GaugeValue , chassisStatusStateValue , ChassisLabelValues ... )
344
353
}
345
354
355
+ chassisManufacturer := chassis .Manufacturer
356
+ chassisModel := chassis .Model
357
+ chassisPartNumber := chassis .PartNumber
358
+ ChassisModelLabelValues := []string {"chassis" , chassisID , chassisManufacturer , chassisModel , chassisPartNumber }
359
+ ch <- prometheus .MustNewConstMetric (c .metrics ["chassis_model_info" ].desc , prometheus .GaugeValue , 1 , ChassisModelLabelValues ... )
360
+
346
361
chassisThermal , err := chassis .Thermal ()
347
362
if err != nil {
348
363
chassisLogContext .WithField ("operation" , "chassis.Thermal()" ).WithError (err ).Error ("error getting thermal data from chassis" )
0 commit comments