DocsPer platform
Synology DSM
On this page
DSM 7.x on x86_64 and aarch64. What each method reads is in the platform table.
Not yet run on real Synology hardware. The recipes below follow Synology's documentation and the shape of DSM's files; they have not been tried on a NAS.
With the agent#
There are two ways. A native SPK package is not built; DSM has no place for your own services to live through updates, so a boot-up task is the supported way to keep the binary running.
Container Manager (x86_64, and the ARMv8 models that Container Manager supports): run the agent container from deploy/docker/compose.agent.yaml, as a Container Manager project, with YARRIX_SETUP_PIN set to the PIN from Add a host (the agent finds the hub itself; set YARRIX_HUB too if it is on another network), or with YARRIX_HUB and YARRIX_ENROLL_TOKEN set. See install.md.
The binary, started by Task Scheduler (everything else):
- On the hub:
yarrix-hub enroll create --host syno-1. - Put the binary on a data volume (not the system volume), for example
/volume1/yarrix/yarrix. Download the file for the CPU (yarrix-linux-x64-musl, or-arm64-musl) from your hub's/download/agent/and check it against its.sha256. - Copy
deploy/agent.example.yamlto/volume1/yarrix/agent.yamland sethub:. - Enroll once by hand:
/volume1/yarrix/yarrix agent --config /volume1/yarrix/agent.yaml --enroll-token <token>, and stop it with Ctrl-C when the host shows up. - Copy
deploy/synology/yarrix-agent-boot.shnext to it and make it executable. In Control Panel, Task Scheduler, create a Triggered Task, User-defined script, userroot, event Boot-up, command/volume1/yarrix/yarrix-agent-boot.sh.
The script starts the agent as root so SMART and RAID are readable. The state (including the per-host token) is under /volume1/yarrix/state, mode 0700.
The hub can also run on DSM: deploy/synology/compose.yaml, a Container Manager project (DSM 7.2 or later). Put a reverse proxy rule with a certificate in front, because plain HTTP is not encrypted (auth.md).
Agentless over SSH#
DSM's SSH server is built in. Enable it under Control Panel, Terminal & SNMP. As far as Synology documents it, DSM 7 lets only members of the administrators group log in over SSH (not checked here), which makes the collector account an administrator; keep it for Yarrix only, with its own key.
-
Create the user in Control Panel, User & Group, in the
administratorsgroup. -
Put the hub's public key in that user's
~/.ssh/authorized_keys, mode 600, with the home folder not writable by others (sshd rejects a key in a group-writable folder). DSM also needs the user home service enabled for home folders to exist. -
Root-only readings (SMART) need
sudo -nwith a passwordless rule for the commands. Add it withsudo visudo -f /etc/sudoers.d/yarrix, then setssh.sudo: true. -
Host file:
id: syno-1 os: synology collect: { method: ssh } ssh: target: yarrix@syno-1.example.internal identity_file: /path/to/yarrix_collector sudo: true
RAID health needs no root: DSM's RAID is Linux md (SHR is md plus LVM), so the probe reads /proc/mdstat. The DSM version comes from /etc.defaults/VERSION.
The hub container image carries an SSH client, so agentless collection works from it (Linux page).
Known limits#
- Btrfs scrub state is not read yet.
- Services: the agent reads
systemctlif DSM provides it; that is unverified on DSM. - Temperature is whatever the kernel exposes through hwmon; some models expose little.
- Keep the binary and state on a data volume (
/volume1), not the system partition.