pub struct AlertExpressionInput {
pub metric: String,
pub agg: AlertExpressionInputAgg,
pub match_: Option<Vec<String>>,
pub by: Option<Vec<String>>,
pub denominator: Option<AlertQueryInput>,
pub scale: f64,
pub unit: Option<String>,
}Fields§
§metric: String§agg: AlertExpressionInputAgg§match_: Option<Vec<String>>Label matchers (label=value, label!=value, label=~regex, label!~regex). Tenant scope is always applied independently.
by: Option<Vec<String>>Grouping labels; the resulting series are summed to match the console metric card.
denominator: Option<AlertQueryInput>§scale: f64Multiplier after optional division, e.g. 100 for a percentage or 1/1048576 for MiB/s.
unit: Option<String>Display unit for the scaled threshold and value.
Implementations§
Source§impl AlertExpressionInput
impl AlertExpressionInput
Sourcepub fn new(metric: String, agg: AlertExpressionInputAgg, scale: f64) -> Self
pub fn new(metric: String, agg: AlertExpressionInputAgg, scale: f64) -> Self
Set the required fields; optional fields start omitted.
Trait Implementations§
Source§impl Clone for AlertExpressionInput
impl Clone for AlertExpressionInput
Source§impl Debug for AlertExpressionInput
impl Debug for AlertExpressionInput
Source§impl<'de> Deserialize<'de> for AlertExpressionInput
impl<'de> Deserialize<'de> for AlertExpressionInput
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 AlertExpressionInput
impl RefUnwindSafe for AlertExpressionInput
impl Send for AlertExpressionInput
impl Sync for AlertExpressionInput
impl Unpin for AlertExpressionInput
impl UnsafeUnpin for AlertExpressionInput
impl UnwindSafe for AlertExpressionInput
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