Added ticket summary
This commit is contained in:
@ -32,7 +32,7 @@ class SystemHealthMonitor:
|
|||||||
'DISK_WARNING': PRIORITIES['MEDIUM'],
|
'DISK_WARNING': PRIORITIES['MEDIUM'],
|
||||||
'UNCORRECTABLE_ECC': PRIORITIES['HIGH'],
|
'UNCORRECTABLE_ECC': PRIORITIES['HIGH'],
|
||||||
'CORRECTABLE_ECC': PRIORITIES['MEDIUM'],
|
'CORRECTABLE_ECC': PRIORITIES['MEDIUM'],
|
||||||
'CPU_HIGH': PRIORITIES['MEDIUM'],
|
'CPU_HIGH': PRIORITIES['LOW'],
|
||||||
'NETWORK_FAILURE': PRIORITIES['HIGH']
|
'NETWORK_FAILURE': PRIORITIES['HIGH']
|
||||||
}
|
}
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
@ -46,7 +46,7 @@ class SystemHealthMonitor:
|
|||||||
'NETWORKS': {
|
'NETWORKS': {
|
||||||
'MANAGEMENT': '10.10.10.1',
|
'MANAGEMENT': '10.10.10.1',
|
||||||
'CEPH': '10.10.90.1',
|
'CEPH': '10.10.90.1',
|
||||||
'PING_TIMEOUT': 1, # seconds
|
'PING_TIMEOUT': 1,
|
||||||
'PING_COUNT': 1
|
'PING_COUNT': 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -382,6 +382,39 @@ class SystemHealthMonitor:
|
|||||||
3. Check workload distribution
|
3. Check workload distribution
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
SEVERITY_INDICATORS = {
|
||||||
|
'CRITICAL': '🔴',
|
||||||
|
'WARNING': '🟡',
|
||||||
|
'HEALTHY': '🟢',
|
||||||
|
'UNKNOWN': '⚪'
|
||||||
|
}
|
||||||
|
|
||||||
|
def _get_issue_type(self, issue: str) -> str:
|
||||||
|
if "SMART" in issue:
|
||||||
|
return "SMART Health Issue"
|
||||||
|
elif "Drive" in issue:
|
||||||
|
return "Storage Issue"
|
||||||
|
elif "ECC" in issue:
|
||||||
|
return "Memory Issue"
|
||||||
|
elif "CPU" in issue:
|
||||||
|
return "Performance Issue"
|
||||||
|
elif "Network" in issue:
|
||||||
|
return "Network Issue"
|
||||||
|
return "Hardware Issue"
|
||||||
|
|
||||||
|
def _get_impact_level(self, issue: str) -> str:
|
||||||
|
if "CRITICAL" in issue or "UNHEALTHY" in issue:
|
||||||
|
return "🔴 Critical - Immediate Action Required"
|
||||||
|
elif "WARNING" in issue:
|
||||||
|
return "🟡 Warning - Action Needed Soon"
|
||||||
|
return "🟢 Low - Monitor Only"
|
||||||
|
|
||||||
|
executive_summary = f"""
|
||||||
|
┏━ EXECUTIVE SUMMARY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||||
|
┃ Issue Type │ {self._get_issue_type(issue)} ┃
|
||||||
|
┃ Impact Level │ {self._get_impact_level(issue)} ┃
|
||||||
|
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||||
|
"""
|
||||||
|
|
||||||
# Add relevant SMART descriptions
|
# Add relevant SMART descriptions
|
||||||
for attr in SMART_DESCRIPTIONS:
|
for attr in SMART_DESCRIPTIONS:
|
||||||
|
|||||||
Reference in New Issue
Block a user