- Update smartFetchMap expiration when agent smart interval changes
- Prevent background SMART fetching before initial system details are
loaded
- Add buffer to SMART fetch timing check
- Get rid of unnecessary pointers in expirymap
- Introduced a new test file `alerts_disk_test.go` to validate the behavior of disk alerts using historical data for extra filesystems.
- Enhanced the `HandleSystemAlerts` function to correctly calculate disk usage for extra filesystems based on historical records.
- Updated the `SystemAlertStats` struct to include `ExtraFs` for tracking additional filesystem statistics.
Move tracking of the last SMART data fetch from individual System
instances to the SystemManager using a TTL-based ExpiryMap.
This ensures that the SMART_INTERVAL is respected even if an
agent connection is dropped and re-established, preventing
redundant data collection on every reconnect.
Use Info.BandwidthBytes converted to MB/s with float division so
bandwidth alert checks are based on current data without integer
truncation near thresholds.
* feat: add outbound heartbeat monitoring to external endpoints
Allow Beszel hub to periodically ping an external monitoring service
(e.g. BetterStack, Uptime Kuma, Healthchecks.io) with system status
summaries, enabling monitoring without exposing Beszel to the internet.
Configuration via environment variables:
- BESZEL_HUB_HEARTBEAT_URL: endpoint to ping (required to enable)
- BESZEL_HUB_HEARTBEAT_INTERVAL: seconds between pings (default: 60)
- BESZEL_HUB_HEARTBEAT_METHOD: HTTP method - POST/GET/HEAD (default: POST)
* SMART: add eMMC health via sysfs
Read eMMC wear/EOL indicators from /sys/class/block/mmcblk*/device and expose in SMART device list. Includes mocked sysfs tests and UI tweaks for unknown temps.
* small optimizations for emmc scan and parsing
* smart: keep smartctl optional only for Linux hosts with eMMC
* update smart alerts to handle warning state
* refactor: rename binPath to smartctlPath and replace hasSmartctl with smartctlPath checks
---------
Co-authored-by: henrygd <hank@henrygd.me>
When reusing slices/structs with json.Unmarshal, fields marked with
omitzero that are missing in the JSON are not reset to zero - they
retain values from previous iterations.
This caused containers without bandwidth data to inherit values from
other containers that happened to occupy the same backing array
position in previous records, resulting in inflated 10m averages.
- Set containerStats to nil instead of [:0] to force fresh allocation
- Reset tempStats each iteration in AverageSystemStats
Changes container network statistics to use raw byte values instead of converting to megabytes agent-side, providing more accurate measurements for low-bandwidth containers. Maintains backward compatibility with older agents/hubs through fallback logic.
- Agent now sends Bandwidth field as [sent_bytes, recv_bytes] array
- Deprecated NetworkSent/NetworkRecv fields still populated for compatibility
- Hub and frontend fall back to deprecated fields when Bandwidth is zero
- Record averaging correctly handles both old and new formats
- TODO markers added for cleanup in version 0.19+
* feat: Added tooltips for navbar buttons to clear meaning of each one.
* update tooltips and fix linter errors
---------
Co-authored-by: henrygd <hank@henrygd.me>
- Move SELinux context handling to internal/ghupdate for reuse
- Make chcon a true fallback (only runs if semanage/restorecon unavailable)
- Handle existing semanage rules with -m (modify) after -a (add) fails
- Apply SELinux handling to both agent and hub updates
- Add tests with proper skip behavior for SELinux systems
---------
Co-authored-by: henrygd <hank@henrygd.me>