pub struct AlertTransition {
pub origin: String,
pub producer: String,
pub alert_key: String,
pub alert_ref: String,
pub state: AlertState,
pub severity: Option<String>,
pub rule: Option<String>,
pub labels: BTreeMap<String, String>,
pub summary: Option<String>,
pub timestamp: Option<String>,
pub at: String,
pub rendering: RenderSource,
}Expand description
One alert key’s state change, with everything the key and the payload said about it.
origin, producer and alert_key are read from the key, never
the payload (RFC 11 §3.2 — a proxy producer’s source is the polled
device). The optional fields are lifted from the decoded document when it
carried them and are None otherwise; a Resolved transition carries
none of them, because a tombstone carries no document.
Fields§
§origin: StringThe publishing origin chunk (h-<12hex>, or a service origin).
producer: StringThe producer chunk.
alert_key: StringThe <alert_key> chunk (RFC 11 §3.1 for the reference profile).
alert_ref: Stringorigin.producer.alert_key (RFC 11 §3.2) — the one-chunk identity an
acknowledgement is keyed by.
state: AlertState§severity: Option<String>The document’s severity, verbatim, when it carried one.
rule: Option<String>The document’s rule, when it carried one.
labels: BTreeMap<String, String>The document’s labels (string-valued; the host label is dropped —
the origin already says which host, RFC 11 §3.1).
summary: Option<String>The document’s summary or message, when it carried one.
timestamp: Option<String>The sample’s HLC timestamp as the engine renders it, when the sample
carried one — whose clock that is is the crate::StampProvenance
question, not answered here.
at: StringRFC 3339 wall clock of the observation.
rendering: RenderSourceTrait Implementations§
Source§impl Clone for AlertTransition
impl Clone for AlertTransition
Source§fn clone(&self) -> AlertTransition
fn clone(&self) -> AlertTransition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AlertTransition
impl Debug for AlertTransition
impl Eq for AlertTransition
Source§impl PartialEq for AlertTransition
impl PartialEq for AlertTransition
Source§impl Serialize for AlertTransition
impl Serialize for AlertTransition
impl StructuralPartialEq for AlertTransition
Auto Trait Implementations§
impl Freeze for AlertTransition
impl RefUnwindSafe for AlertTransition
impl Send for AlertTransition
impl Sync for AlertTransition
impl Unpin for AlertTransition
impl UnsafeUnpin for AlertTransition
impl UnwindSafe for AlertTransition
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more