pub struct AlertRule {
pub id: AlertId,
pub name: String,
pub metric: MetricId,
pub condition: AlertCondition,
pub threshold: f64,
pub duration: Duration,
pub severity: AlertSeverity,
pub enabled: bool,
pub notify: Vec<NotificationChannel>,
}Expand description
Alert rule definition.
Fields§
§id: AlertIdUnique identifier for the alert rule
name: StringHuman-readable name for the alert
metric: MetricIdMetric ID this alert monitors
condition: AlertConditionCondition that triggers the alert
threshold: f64Threshold value for the condition
duration: DurationDuration the condition must persist before alerting
severity: AlertSeveritySeverity level of the alert
enabled: boolWhether the alert rule is active
notify: Vec<NotificationChannel>Notification channels to use when alert triggers
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AlertRule
impl<'de> Deserialize<'de> for AlertRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AlertRule
impl RefUnwindSafe for AlertRule
impl Send for AlertRule
impl Sync for AlertRule
impl Unpin for AlertRule
impl UnsafeUnpin for AlertRule
impl UnwindSafe for AlertRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more