towerops/CHANGELOG.txt
Graham McIntire 2875866c07
fix agent-polled devices stuck in unknown status
store_monitoring_check saved ping results from agents but never
updated device status. DeviceMonitorWorker skips agent-assigned
devices, so nothing ever moved them from :unknown to :up/:down.

added update_device_status_from_check to derive status from check
result, update the device, create alerts on transitions, and
broadcast via PubSub — matching DeviceMonitorWorker behavior.
2026-02-11 14:03:04 -06:00

22 lines
1.3 KiB
Text

CHANGELOG - towerops-web
========================
2026-02-11 - fix: update device status from agent monitoring checks
- File: lib/towerops_web/channels/agent_channel.ex (store_monitoring_check/2)
- Bug: Devices polled by remote agents stayed in "unknown" state because
store_monitoring_check saved the ping result but never called
Devices.update_device_status/2. The DeviceMonitorWorker (Phoenix-side)
skips agent-assigned devices entirely, so nothing ever updated status.
- Fix: Added update_device_status_from_check/2 and handle_agent_status_change/3
to derive :up/:down from check status, update device, create alerts on
transitions, and broadcast via PubSub — matching DeviceMonitorWorker behavior
- Also added alias Towerops.Alerts to the channel module
2026-02-11 - fix: update last_snmp_poll_at for agent-polled devices
- File: lib/towerops_web/channels/agent_channel.ex (process_polling_result/3)
- Bug: Devices polled by remote agents showed "Last Polled: Never" because
process_polling_result never called Devices.update_snmp_poll_time/1
- The Phoenix-side DevicePollerWorker already had this call (line 172),
but the agent channel path was missing it
- Fix: Added Devices.update_snmp_poll_time(device) at the top of
process_polling_result/3, matching the DevicePollerWorker pattern