Install Netdata on Synology¶
The documentation previously recommended installing the Debian Chroot package from the Synology community package
sources and then running Netdata from within the chroot. This does not work, as the chroot environment does not have
/proc, and therefore exposes very few metrics to Netdata. Additionally, this
issue, still open as of 2018/06/24, indicates that the Debian
Chroot package is not suitable for DSM versions greater than version 5 and may corrupt system libraries and render the
NAS unable to boot.
The good news is that the 64-bit static installer works fine if your NAS is one that uses the amd64 architecture. It
will install the content into
/opt/netdata, making future removal safe and simple.
When Netdata is first installed, it will run as root. This may or may not be acceptable for you, and since other
installations run it as the
netdata user, you might wish to do the same. This requires some extra work:
- Creat a group
netdatavia the Synology group interface. Give it no access to anything.
- Create a user
netdatavia the Synology user interface. Give it no access to anything and a random password. Assign the user to the
netdatagroup. Netdata will chuid to this user when running.
- Change ownership of the following directories, as defined in Netdata Security:
chown -R root:netdata /opt/netdata/usr/share/netdata chown -R netdata:netdata /opt/netdata/var/lib/netdata /opt/netdata/var/cache/netdata chown -R netdata:root /opt/netdata/var/log/netdata
Additionally, as of 2018/06/24, the Netdata installer doesn’t recognize DSM as an operating system, so no init script is installed. You’ll have to do this manually:
- Add this file as
/etc/rc.netdata. Make it executable with
chmod 0755 /etc/rc.netdata.
/etc/rc.localand add a line calling
/etc/rc.netdatato have it start on boot:
# Netdata startup [ -x /etc/rc.netdata ] && /etc/rc.netdata start