diff --git a/src/system-health/health_checker/hardware_checker.py b/src/system-health/health_checker/hardware_checker.py index cf5b86bea2be..7bbc4bdaca00 100644 --- a/src/system-health/health_checker/hardware_checker.py +++ b/src/system-health/health_checker/hardware_checker.py @@ -89,11 +89,6 @@ def _check_fan_status(self, config): self.set_object_not_ok('Fan', name, '{} is missing'.format(name)) continue - status = data_dict.get('status', 'false') - if status.lower() != 'true': - self.set_object_not_ok('Fan', name, '{} is broken'.format(name)) - continue - if not self._ignore_check(config.ignore_devices, 'fan', name, 'speed'): speed = data_dict.get('speed', None) speed_target = data_dict.get('speed_target', None) @@ -130,6 +125,11 @@ def _check_fan_status(self, config): speed_tolerance)) continue + status = data_dict.get('status', 'false') + if status.lower() != 'true': + self.set_object_not_ok('Fan', name, '{} is broken'.format(name)) + continue + self.set_object_ok('Fan', name) def _check_psu_status(self, config):