towerops/lib/towerops_web/channels
Graham McIntire 3f1d97218d
fix(alerts): auto-resolve device_down alerts when agent polls device successfully
When agents poll devices via SNMP and get successful results, the code was
only processing sensor/interface data without updating device status or
resolving alerts. This caused device_down alerts to persist even after
devices came back online.

This fix:
- Updates device status to 'up' when SNMP polling succeeds
- Auto-resolves any active device_down alerts
- Creates device_up alert (matching DeviceMonitorWorker behavior)
- Broadcasts device_status_changed via PubSub

Also fixes device_up alert creation to include resolved_at timestamp
(matching DeviceMonitorWorker behavior).

Test coverage: Added test verifying auto-resolution when device recovers.
2026-03-05 16:47:48 -06:00
..
agent_channel.ex fix(alerts): auto-resolve device_down alerts when agent polls device successfully 2026-03-05 16:47:48 -06:00
agent_socket.ex Add Dialyzer typespecs to WebSocket agent code and Agents context 2026-01-17 10:37:27 -06:00