pub struct AlertRule {
pub name: String,
pub description: String,
pub query: String,
pub threshold: AlertThreshold,
pub evaluation_interval: Duration,
pub severity: AlertSeverity,
pub labels: HashMap<String, String>,
}
Expand description
Alert rule definition
Fields§
§name: String
Rule name
description: String
Rule description
query: String
Metric query expression
threshold: AlertThreshold
Alert threshold
evaluation_interval: Duration
Evaluation interval
severity: AlertSeverity
Alert severity
labels: HashMap<String, String>
Labels for the alert
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 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