pub struct Alert {Show 15 fields
pub id: Uuid,
pub rule_id: String,
pub message: String,
pub severity: AlertSeverity,
pub state: AlertState,
pub triggered_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub acknowledged_at: Option<DateTime<Utc>>,
pub acknowledged_by: Option<String>,
pub resolved_at: Option<DateTime<Utc>>,
pub current_value: f64,
pub threshold: f64,
pub labels: HashMap<String, String>,
pub trigger_count: u64,
pub last_notification_at: Option<DateTime<Utc>>,
}
Expand description
Alert instance
Fields§
§id: Uuid
Unique alert ID
rule_id: String
Rule that triggered this alert
message: String
Alert message
severity: AlertSeverity
Alert severity
state: AlertState
Current state
triggered_at: DateTime<Utc>
When the alert was first triggered
updated_at: DateTime<Utc>
When the alert was last updated
acknowledged_at: Option<DateTime<Utc>>
When the alert was acknowledged (if applicable)
acknowledged_by: Option<String>
Who acknowledged the alert
resolved_at: Option<DateTime<Utc>>
When the alert was resolved (if applicable)
current_value: f64
Current metric value that triggered the alert
threshold: f64
Threshold that was exceeded
labels: HashMap<String, String>
Labels associated with this alert
trigger_count: u64
Number of times this alert has been triggered
last_notification_at: Option<DateTime<Utc>>
Last notification sent timestamp
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Alert
impl<'de> Deserialize<'de> for Alert
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 Alert
impl RefUnwindSafe for Alert
impl Send for Alert
impl Sync for Alert
impl Unpin for Alert
impl UnwindSafe for Alert
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