ADJUSTED ASCII ART
This commit is contained in:
@ -200,13 +200,13 @@ class SystemHealthMonitor:
|
||||
) + 10 # Add padding
|
||||
|
||||
banner = f"""
|
||||
┏{'━' * content_width}┓
|
||||
┃{' HARDWARE MONITORING ALERT TICKET '.center(content_width)}┃
|
||||
┣{'━' * content_width}┫
|
||||
┃ Host : {hostname:<{content_width-13}}┃
|
||||
┃ Generated : {timestamp:<{content_width-13}}┃
|
||||
┃ Priority : {priority:<{content_width-13}}┃
|
||||
┗{'━' * content_width}┛
|
||||
┏{'━' * content_width}┓
|
||||
┃{' HARDWARE MONITORING ALERT TICKET '.center(content_width)}┃
|
||||
┣{'━' * content_width}┫
|
||||
┃ Host : {hostname:<{content_width-13}}┃
|
||||
┃ Generated : {timestamp:<{content_width-13}}┃
|
||||
┃ Priority : {priority:<{content_width-13}}┃
|
||||
┗{'━' * content_width}┛
|
||||
"""
|
||||
|
||||
description = banner + "\n" + "┏━ ISSUE SUMMARY " + "━" * 50 + "\n" + issue + "\n\n"
|
||||
@ -410,14 +410,14 @@ class SystemHealthMonitor:
|
||||
age = f"{int(power_on_hours/24/365) if isinstance(power_on_hours, (int, float)) else 'N/A'} years" if power_on_hours != 'N/A' else 'N/A'
|
||||
|
||||
description += """
|
||||
┏━ DRIVE SPECIFICATIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Device Path │ {:<60} ┃
|
||||
┃ Model │ {:<60} ┃
|
||||
┃ Serial │ {:<60} ┃
|
||||
┃ Capacity │ {:<60} ┃
|
||||
┃ Type │ {:<60} ┃
|
||||
┃ Firmware │ {:<60} ┃
|
||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
┏━ DRIVE SPECIFICATIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Device Path │ {:<60} ┃
|
||||
┃ Model │ {:<60} ┃
|
||||
┃ Serial │ {:<60} ┃
|
||||
┃ Capacity │ {:<60} ┃
|
||||
┃ Type │ {:<60} ┃
|
||||
┃ Firmware │ {:<60} ┃
|
||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
""".format(
|
||||
device,
|
||||
drive_details['model'],
|
||||
@ -436,20 +436,20 @@ class SystemHealthMonitor:
|
||||
}
|
||||
|
||||
description += f"""
|
||||
┏━ PERFORMANCE METRICS ━{'━' * 48}┓
|
||||
┃ Read Speed │ {perf_metrics['read_speed']} MB/s {' ' * 45}┃
|
||||
┃ Write Speed │ {perf_metrics['write_speed']} MB/s {' ' * 45}┃
|
||||
┃ Access Time │ {perf_metrics['access_time']} ms {' ' * 47}┃
|
||||
┃ IOPS │ {perf_metrics['iops']}{' ' * 52}┃
|
||||
┗{'━' * 71}┛
|
||||
┏━ PERFORMANCE METRICS ━{'━' * 48}┓
|
||||
┃ Read Speed │ {perf_metrics['read_speed']} MB/s {' ' * 45}┃
|
||||
┃ Write Speed │ {perf_metrics['write_speed']} MB/s {' ' * 45}┃
|
||||
┃ Access Time │ {perf_metrics['access_time']} ms {' ' * 47}┃
|
||||
┃ IOPS │ {perf_metrics['iops']}{' ' * 52}┃
|
||||
┗{'━' * 71}┛
|
||||
"""
|
||||
|
||||
description += """
|
||||
┏━ DRIVE TIMELINE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Power-On Hours │ {:<56} ┃
|
||||
┃ Last SMART Test │ {:<56} ┃
|
||||
┃ Drive Age │ {:<56} ┃
|
||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
┏━ DRIVE TIMELINE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Power-On Hours │ {:<56} ┃
|
||||
┃ Last SMART Test │ {:<56} ┃
|
||||
┃ Drive Age │ {:<56} ┃
|
||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
""".format(
|
||||
f"{power_on_hours} hours" if power_on_hours != 'N/A' else 'N/A',
|
||||
last_test_date,
|
||||
@ -459,10 +459,10 @@ class SystemHealthMonitor:
|
||||
for drive in health_report.get('drives_health', {}).get('drives', []):
|
||||
if drive['device'] == device:
|
||||
description += """
|
||||
┏━ SMART STATUS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Status │ {:<60} ┃
|
||||
┃ Temperature │ {:<60} ┃
|
||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
┏━ SMART STATUS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Status │ {:<60} ┃
|
||||
┃ Temperature │ {:<60} ┃
|
||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
""".format(
|
||||
drive['smart_status'],
|
||||
f"{drive.get('temperature')}°C" if drive.get('temperature') else 'N/A'
|
||||
@ -483,14 +483,14 @@ class SystemHealthMonitor:
|
||||
usage_meter = '█' * blocks + '░' * (20 - blocks)
|
||||
|
||||
description += """
|
||||
┏━ PARTITION [{:<60}] ━┓
|
||||
┃ Filesystem │ {:<60} ┃
|
||||
┃ Usage Meter │ [{:<58}] ┃
|
||||
┃ Total Space │ {:<60} ┃
|
||||
┃ Used Space │ {:<60} ┃
|
||||
┃ Free Space │ {:<60} ┃
|
||||
┃ Usage │ {:<60} ┃
|
||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
┏━ PARTITION [{:<60}] ━┓
|
||||
┃ Filesystem │ {:<60} ┃
|
||||
┃ Usage Meter │ [{:<58}] ┃
|
||||
┃ Total Space │ {:<60} ┃
|
||||
┃ Used Space │ {:<60} ┃
|
||||
┃ Free Space │ {:<60} ┃
|
||||
┃ Usage │ {:<60} ┃
|
||||
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
""".format(
|
||||
partition['mountpoint'],
|
||||
partition['fstype'],
|
||||
|
||||
Reference in New Issue
Block a user