mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-17 02:58:51 +00:00
Add 'type' field to sensors
In sensors/ and health/, put 'type' field in to clarify the sensor reading category.
This commit is contained in:
parent
d27df8fffc
commit
24eb872090
@ -740,6 +740,8 @@ class SensorReadings(ConfluentMessage):
|
||||
sensordict['states'] = sensor['states']
|
||||
if 'health' in sensor:
|
||||
sensordict['health'] = sensor['health']
|
||||
if 'type' in sensor:
|
||||
sensordict['type'] = sensor['type']
|
||||
readings.append(sensordict)
|
||||
if self.notnode:
|
||||
self.kvpairs = {'sensors': readings}
|
||||
|
@ -280,7 +280,9 @@ persistent_ipmicmds = {}
|
||||
def _dict_sensor(pygreading):
|
||||
retdict = {'name': pygreading.name, 'value': pygreading.value,
|
||||
'states': pygreading.states, 'units': pygreading.units,
|
||||
'health': _str_health(pygreading.health)}
|
||||
'health': _str_health(pygreading.health),
|
||||
'type': pygreading.type,
|
||||
}
|
||||
return retdict
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user