Struct nagiosplugin::Metric [−][src]
pub struct Metric<T> { /* fields omitted */ }
Expand description
Defines a metric with a required name and value. Also takes optional thresholds (warning, critical) minimum, maximum. Can also be set to ignore thresholds and have a fixed ServiceState.
Implementations
pub fn with_thresholds(
self,
warning: T,
critical: T,
trigger_if_value: TriggerIfValue
) -> Self
If a fixed state is set, this metric will always report the given state if turned in to a CheckResult.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Metric<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Metric<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more