We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb3b063 commit 9f714a6Copy full SHA for 9f714a6
models/system.py
@@ -158,6 +158,9 @@ def get_system_health_summary():
158
if severity in summary:
159
summary[severity] = count
160
161
+ # Calculate total before adding status
162
+ total_events = summary['critical'] + summary['error'] + summary['warning'] + summary['info']
163
+
164
# Determine overall health status
165
if summary['critical'] > 0:
166
summary['status'] = 'critical'
@@ -168,7 +171,7 @@ def get_system_health_summary():
168
171
else:
169
172
summary['status'] = 'healthy'
170
173
- summary['last_24h_total'] = sum(summary.values()) - (1 if 'status' in summary else 0)
174
+ summary['last_24h_total'] = total_events
175
176
return summary
177
0 commit comments