/metrics: whether the dongle is still on the bus #1

Merged
jhgaylor merged 1 commit from dongle-metric into main 2026-10-26 06:18:11 +00:00
Owner

radioman_dongle_present reads 1 while sysfs has the RTL-SDR (0bda:2838) at a /dev/bus/usb/BBB/DDD node this process can open. In the pod, the only node is the one the device plugin handed over. So a dongle that was unplugged, or dropped off and came back under a new device number, reads 0 until the pod is replaced. On 2026-10-24 the dongle fell off geek's USB hub, and the app still looked healthy until it was replugged two days later.

/healthz reports the same value but still returns ok, because restarting the container keeps the same stale device node. home-cloud scrapes /metrics and alerts on it (companion PR there).

Tested against fake sysfs trees (present, unplugged, re-enumerated, a different device, no sysfs) and in the live pod on geek, where it reads True.

🤖 Generated with Claude Code

`radioman_dongle_present` reads 1 while sysfs has the RTL-SDR (`0bda:2838`) at a `/dev/bus/usb/BBB/DDD` node this process can open. In the pod, the only node is the one the device plugin handed over. So a dongle that was unplugged, or dropped off and came back under a new device number, reads 0 until the pod is replaced. On 2026-10-24 the dongle fell off geek's USB hub, and the app still looked healthy until it was replugged two days later. `/healthz` reports the same value but still returns ok, because restarting the container keeps the same stale device node. home-cloud scrapes `/metrics` and alerts on it (companion PR there). Tested against fake sysfs trees (present, unplugged, re-enumerated, a different device, no sysfs) and in the live pod on geek, where it reads `True`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
radioman_dongle_present is 1 while sysfs has the RTL-SDR at a device node this
process can open. In the pod that's only the node the device plugin handed
over, so a dongle that was unplugged, or dropped off and came back under a new
device number, reads 0 until the pod is replaced: on 2026-10-24 it fell off
geek's USB hub and the app looked healthy for days. home-cloud alerts on it.

/healthz reports it too but stays up, since restarting the container keeps the
same stale device node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jhgaylor/radioman!1
No description provided.