Skip to main content

Alert Escalation

Escalation is an automatic mechanism that highlights alerts not handled within the expected timeframe, ensuring that no occurrence goes unnoticed.

How it works

A scheduled job (EscalateUnacknowledgedAlertsJob) runs every 30 seconds — for each active site — and looks for alerts that:

  1. Are still in Active status
  2. Have not been acknowledged by any operator
  3. Have not yet been escalated (is_escalated = false)
  4. Have exceeded the escalation timeout defined for the alert type

When these conditions are met, the alert is marked as escalated. The check only considers alert types whose handler declares itself escalatable.

Escalation times by type

Each alert type has its own escalation time, defined by the module that registered it:

Alert typeTimeEscalatable
Panic Button2 minYes
Device OfflineConfigurableYes
Antenna OfflineConfigurableYes
Low BatteryConfigurableYes
Restricted Zone EntryConfigurableYes
Caution

Panic Button alerts have only 2 minutes before being escalated. This reflects the criticality of the scenario — a person in an emergency needs an immediate response.

Timeout configuration

The escalation timeout is defined by the LOCATION_ESCALATION_TIMEOUT variable in config/location.php (default 120 seconds = 2 minutes). Each alert handler can expose its own timeout; the exact times per type depend on the module that registered the alert.

What happens on escalation

When an alert is escalated:

  1. The is_escalated field is set to true
  2. A high-severity event is recorded (AlertEscalated)
  3. The event is broadcast via WebSocket to all connected operators
  4. The alert gains visual emphasis in the interface (escalation badge)

Visual impact

Escalated alerts are visually differentiated:

  • "Escalated" badge — Displayed in the alert list and in the details
  • Elevated severity — The escalation event is recorded as High severity
  • Detailed record — The AlertEscalated event includes: alert type, the time it was triggered (triggered_at), elapsed time in seconds, the zone (id and name), and the identification of the alert source

How to prevent escalation

Escalation is prevented when an operator acknowledges the alert within the timeframe:

Alert created → Acknowledged in < 2 min → NOT escalated ✓
Alert created → No action for > 2 min → ESCALATED ⚠

After escalation, the alert can still be acknowledged and resolved normally. The escalation flag is only a historical indicator.

Monitoring

Escalated alerts can be filtered in the alert list and appear in the performance reports, allowing analysis of the operations team's response times.