Skip to content

Commit

Permalink
Create issue_detection.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored May 10, 2024
1 parent 8c0dbcc commit a442f07
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions system_monitoring/issue_detection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class IssueDetection:
def __init__(self, system_monitoring):
self.system_monitoring = system_monitoring

def detect_issues(self):
if self.system_monitoring.cpu_percent > 80:
print('High CPU usage detected!')
if self.system_monitoring.memory_percent > 80:
print('High memory usage detected!')
if self.system_monitoring.disk_percent > 80:
print('High disk usage detected!')

0 comments on commit a442f07

Please sign in to comment.