Beszel started as a graph of CPU, memory and disks. The network monitors add something I find more useful on a home server: the agent itself checks whether it can still reach your router, your DNS server or a website, from where it sits.
Open Network Monitors in the hub’s navbar and choose Add Monitor. You pick one or more systems, a target (hostname, IP address or URL), a protocol (ICMP, TCP, HTTP or DNS) and an interval from 1 to 3600 seconds, with 30 as the default. Selecting several systems creates one monitor per system. The feature needs agent version 0.20.0 or later, and the documentation says there are no agent environment variables or flags to set.
What gets measured differs per protocol. ICMP is the round trip of an echo request, TCP is the time to open a connection (the DNS lookup is excluded), HTTP is a GET that counts as lost when it fails or returns status 400 or higher, and DNS is the time to resolve the name.
The catch is ICMP, which needs permission to send echo requests. The agent tries a raw socket first, then an unprivileged datagram socket, then the system ping command. The default agent image only contains the agent binary, so the ping fallback doesn’t exist in Docker. Raw sockets work for a container running as root with Docker’s default capabilities. If you dropped capabilities, add this one back:
beszel-agent:
image: henrygd/beszel-agent
cap_add:
- NET_RAW
Setting the agent’s LOG_LEVEL to debug shows which ICMP method it picked. For the agent as a systemd service the documentation uses AmbientCapabilities=CAP_NET_RAW and CapabilityBoundingSet=CAP_NET_RAW.
The alert is called Network Monitor Loss. It fires when the packet loss over the past hour is above the threshold on the system’s alert sheet (default 5%), and it needs at least three probes first. One more thing to know: changing the target, protocol or port creates a new monitor and its history starts over, while changing only the interval keeps it. This follows the documentation and was not run against a live hub.
Further reading: Beszel network monitoring
Going deeper: Keep a domain pointed at your home with Cloudflare DDNS on Unraid