Systemd Services
Beszel provides a basic overview of systemd services, displaying their status, CPU usage, memory consumption, and other metrics.
What Gets Displayed
The agent collects data for systemd services that have been active at least once (including failed or exited ones), showing:
- Service status (active, inactive, failed, etc.)
- CPU and memory usage
- Restart counts
- Unit file state and description
- Lifecycle (became active, became inactive, etc.)
Notes:
- Peak memory usage covers the entire lifetime of the service if provided by systemd. Otherwise, it is the maximum memory usage during the monitoring period.
- Services will show 0% CPU usage on first connection. This is normal behavior - CPU usage will populate correctly on the next update cycle.
Binary agent
When running the agent as a binary, no additional configuration is typically required for systemd monitoring. The agent runs with sufficient privileges to access systemd service information.
If services don't appear on the system page, check the agent logs for errors.
Docker agent
Mount the system D-Bus socket to allow the agent to communicate with systemd:
services:
beszel-agent:
volumes:
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:roIf logs show an AppArmor error, add the following security option:
services:
beszel-agent:
security_opt:
- apparmor:unconfinedIf services still don't appear, try mounting the systemd private socket as well:
services:
beszel-agent:
volumes:
- /var/run/systemd/private:/var/run/systemd/private:roAs a last resort, you can run the container with privileged access. This is useful for testing but not recommended for production.
services:
beszel-agent:
privileged: trueTroubleshooting
Services Not Appearing
Check agent logs for permission or connection errors
Verify systemd accessibility:
bashdbus-send --system --dest=org.freedesktop.systemd1 --type=method_call --print-reply /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager.ListUnitsCheck systemd version compatibility (requires systemd 243+ for
ListUnitsByPatternsmethod support):bashsystemctl --versionVerify agent permissions for accessing systemd services
Common Errors
Common error messages and solutions:
An AppArmor policy prevents this sender from sending this message to this recipient
Add the following to your docker-compose.yml:
services:
beszel-agent:
security_opt:
- apparmor:unconfinedUnknown method 'ListUnitsByPatterns'
Method not supported in systemd < 243. Upgrade to systemd 243 or later.
Compatibility
Systemd version: Requires systemd 243+ for ListUnitsByPatterns method support