pub struct AlertRuleCondition {
pub operator: AlertConditionOperator,
pub threshold: f64,
pub time_aggregation: Option<String>,
pub space_aggregation: Option<String>,
pub minimum_session_gate: Option<f64>,
pub unit: Option<String>,
pub match_type: Option<AlertMatchType>,
pub require_min_points: Option<bool>,
pub required_num_points: Option<u32>,
pub frequency_seconds: Option<u32>,
}Expand description
Compares the query’s aggregated value against a threshold.
Fields§
§operator: AlertConditionOperatorThe comparison operator. Required.
threshold: f64The threshold to compare against. Required.
time_aggregation: Option<String>Overrides the query’s time aggregation for the check.
space_aggregation: Option<String>Overrides the query’s space aggregation for the check.
minimum_session_gate: Option<f64>Require at least this many sessions before the rule can fire.
unit: Option<String>The threshold’s unit.
match_type: Option<AlertMatchType>How the threshold must be met over the window. Defaults to
AlertMatchType::AT_LEAST_ONCE.
require_min_points: Option<bool>Require a minimum number of data points.
required_num_points: Option<u32>The minimum number of data points required.
frequency_seconds: Option<u32>How often the condition is evaluated, in seconds. Defaults to 60.
Implementations§
Source§impl AlertRuleCondition
impl AlertRuleCondition
Sourcepub fn new(operator: AlertConditionOperator, threshold: f64) -> Self
pub fn new(operator: AlertConditionOperator, threshold: f64) -> Self
A condition comparing the aggregated value against threshold.
Trait Implementations§
Source§impl Clone for AlertRuleCondition
impl Clone for AlertRuleCondition
Source§fn clone(&self) -> AlertRuleCondition
fn clone(&self) -> AlertRuleCondition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AlertRuleCondition
impl Debug for AlertRuleCondition
Source§impl<'de> Deserialize<'de> for AlertRuleCondition
impl<'de> Deserialize<'de> for AlertRuleCondition
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 AlertRuleCondition
impl RefUnwindSafe for AlertRuleCondition
impl Send for AlertRuleCondition
impl Sync for AlertRuleCondition
impl Unpin for AlertRuleCondition
impl UnsafeUnpin for AlertRuleCondition
impl UnwindSafe for AlertRuleCondition
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