Dryrun Debugging
This commit is contained in:
@ -291,6 +291,14 @@ class SystemHealthMonitor:
|
||||
if network_health.get(network, {}).get('issues'):
|
||||
issues.extend(network_health[network]['issues'])
|
||||
|
||||
logger.debug("=== Issue Detection Started ===")
|
||||
logger.debug(f"Checking drives: {len(health_report['drives_health']['drives'])} found")
|
||||
logger.debug(f"Memory status: {health_report['memory_health']['status']}")
|
||||
logger.debug(f"CPU status: {health_report['cpu_health']['status']}")
|
||||
logger.debug(f"Network status: {health_report['network_health']}")
|
||||
logger.debug(f"Detected issues: {issues}")
|
||||
logger.debug("=== Issue Detection Completed ===\n")
|
||||
|
||||
return issues
|
||||
|
||||
def _is_physical_disk(self, device_path):
|
||||
@ -352,6 +360,12 @@ class SystemHealthMonitor:
|
||||
f"Known problematic firmware version {firmware_info['version']} "
|
||||
f"for {firmware_info['model']}"
|
||||
)
|
||||
logger.debug(f"=== Firmware Check for {device} ===")
|
||||
logger.debug(f"Firmware version: {firmware_info['version']}")
|
||||
logger.debug(f"Model: {firmware_info['model']}")
|
||||
logger.debug(f"Manufacturer: {firmware_info['manufacturer']}")
|
||||
logger.debug(f"Known issues: {firmware_info['known_issues']}")
|
||||
logger.debug("=== End Firmware Check ===\n")
|
||||
|
||||
except Exception as e:
|
||||
firmware_info['known_issues'].append(f"Error checking firmware: {str(e)}")
|
||||
@ -362,8 +376,6 @@ class SystemHealthMonitor:
|
||||
"""
|
||||
Enhanced SMART health check with detailed failure thresholds.
|
||||
"""
|
||||
logger.debug(f"Checking SMART health for device: {device}")
|
||||
|
||||
smart_health = {
|
||||
'status': 'HEALTHY',
|
||||
'severity': 'NORMAL',
|
||||
@ -497,6 +509,14 @@ class SystemHealthMonitor:
|
||||
except:
|
||||
pass # Skip performance metrics if hdparm fails
|
||||
|
||||
logger.debug(f"=== SMART Health Check for {device} ===")
|
||||
logger.debug("Raw SMART attributes:")
|
||||
for attr, value in smart_health['attributes'].items():
|
||||
logger.debug(f"{attr}: {value}")
|
||||
logger.debug(f"Temperature: {smart_health['temp']}°C")
|
||||
logger.debug(f"Detected Issues: {smart_health['issues']}")
|
||||
logger.debug("=== End SMART Check ===\n")
|
||||
|
||||
except Exception as e:
|
||||
smart_health['status'] = 'ERROR'
|
||||
smart_health['severity'] = 'UNKNOWN'
|
||||
|
||||
Reference in New Issue
Block a user