Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Professional Edition
Description
The function parse_ipmitool_sensor() is not working correctly due to the empty discrete value in includes/definitions/entities/sensors.inc.php.
The following statements in parse_ipmitool_sensor() (includes/entities/sensor.inc.php) returns true if the $unit is discrete:
if (isset($config['ipmi_unit'][$unit])) { |
and the code below (from OBS-3028) will never run:
} elseif ($unit == 'discrete') { |
because an empty value is set in the array, so isset() returns true.
The attached patch will remove empty value from the array. Another option could be checking is there is an actual value in the unit-array:
if (isset($config['ipmi_unit'][$unit]) && $config['ipmi_unit'][$unit]) { |
Sure. I've attached the poller output, along with the output from calling 'ipmitool sensor' and 'ipmitool -v sdr' directly. The latter file shows that (for example) the sensor named 'PS1 PG Fail' is of the 'Voltage' type, not 'Power Supply', so its assertions don't match what the existing entPhysicalClass 'powersupply' matching does.
ipmitool-sdr-r730.txt