pub struct AlertRule {
pub name: String,
pub scope: AlertScope,
pub condition: AlertCondition,
pub severity: EventSeverity,
pub message: String,
pub enabled: bool,
pub dedup_window_secs: Option<u64>,
}Expand description
A named alerting rule definition.
Fields§
§name: StringUnique rule name.
scope: AlertScopeWhich events this rule monitors.
condition: AlertConditionHow the rule evaluates the event stream.
severity: EventSeveritySeverity assigned when the rule fires.
message: StringHuman-readable message describing the alert.
enabled: boolWhether this rule is active.
dedup_window_secs: Option<u64>Deduplication window in seconds. If set, the rule will not fire again if it already fired within this window.
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 Forget for AlertRule
impl Freeze for AlertRule
impl Move 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