Implement status aggregation with notification batching

This commit is contained in:
2025-10-21 18:12:42 +02:00
parent a937032eb1
commit 41208aa2a0
8 changed files with 550 additions and 34 deletions

View File

@@ -83,6 +83,7 @@ impl MetricValue {
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub enum Status {
Ok,
Pending,
Warning,
Critical,
Unknown,
@@ -179,6 +180,16 @@ impl HysteresisThresholds {
Status::Ok
}
}
Status::Pending => {
// Service transitioning, use normal thresholds like first measurement
if value >= self.critical_high {
Status::Critical
} else if value >= self.warning_high {
Status::Warning
} else {
Status::Ok
}
}
}
}
}