pub async fn create_alert_escalation(
pool: &Pool<MySql>,
alert_id: i64,
escalation_level: i64,
escalated_to: Value,
escalation_method: &str,
response_required_by: Option<DateTime<Utc>>,
) -> Result<AlertEscalation>
Expand description
Creates an escalation record for an alert.
This function adds an escalation record to indicate that an alert has been escalated to another level of attention, such as notifying administrators or external systems when an alert has not been addressed in a timely manner.
§Arguments
pool
- Database connection pool for executing the queryalert_id
- ID of the alert being escalatedescalation_level
- Level of escalation (typically 1, 2, 3, etc.)escalated_to
- JSON data specifying where/who the alert was escalated toescalation_method
- Method used for escalation (email, SMS, webhook, etc.)response_required_by
- Optional deadline for when a response is required
§Returns
Ok(AlertEscalation)
- Successfully created escalation recordErr(anyhow::Error)
- Failed to create escalation record