refactor(system_monitor): move metrics collection and alerting to dedicated modules

* node_notifier doesn't need sysinfo anymore.
* implement AlertFormatter in node_notifier and its own file.
* implement SystemMonitor, ResourceThreshold, ThresholdViolation, and Severity in system_monitor.
* implement parametrized tests for SystemMonitor.
This commit is contained in:
2025-08-09 10:36:30 +02:00
parent af48990cf7
commit 288ff34c01
9 changed files with 616 additions and 116 deletions

View File

@@ -644,7 +644,7 @@ dependencies = [
"reqwest",
"serde",
"serde_json",
"sysinfo",
"system_monitor",
]
[[package]]
@@ -1093,6 +1093,13 @@ dependencies = [
"libc",
]
[[package]]
name = "system_monitor"
version = "0.1.0"
dependencies = [
"sysinfo",
]
[[package]]
name = "tempfile"
version = "3.20.0"