NetData on a Synology NAS

I have been exploring NetData for a while as I was looking for a better solution to monitor my small homelab. For alerting I have Nagios running on a Raspberry Pi 2, which suffices to get alerts when something is wrong. As this does not really provide useful insights on what happened over time and lacked detailed insight for network equipment, I looked into various solutions over time but did not find what I was looking for. For a long time I tried Observium, but as that was primarily intended for the network side and did not fully meet my needs. It did do what it promised but the SNMP setup required everywhere, the slow SNMP polling mechanism and issues it caused made me decide to move on to something else.

Currently I am trying out Netdata and have a simple setup with a central NetData parent / collector running on a Pi5 (data is stored on an NVMe disk) with all other systems in my homelab streaming the data to and minimum local processing (Thin Mode as per the Netdata documentation). Setting up monitoring for network over SNMP is also pretty simple and although the UI is a lot simpler than Observium, it does what I need right now. NetData documentation is pretty good, so I will not cover my basic setup or the various options available in this post but focus on adding a Synology NAS..

Today I added my Synology DS1618+ to this setup so that I can get metrics and alerts via NetData for it as well (currently Nagios uses SNMP to monitor some aspects to it and that simply fails too often causing false alarms that I want to get rid of.

The initial install was based on the Install Netdata on Synology page. Then why still a blog post? The good news is that the basic installation now supports Synology DSM 7.2.2 and higher. However, the description was not accurate and left me with a NetData system that had warning alerts that still had to be resolved.. Therefore I share the steps I used install and resolve the issues (and update these when needed).

Initial installation

To install the stable version (now 2.5.1) of NetData, enable automatic update and disable the sharing of usage datas, ssh into the Synology NAS using an account that can run sudo and run the command:

wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --stable-channel --disable-telemetry

Now I do want NetData to run as non-root, but despite the statements on the installation page (at this moment) that this would require additional steps, this turned out not to be true. The installation script already created a netdata user and group and is also running as this. However, the delivered setup is not quite correct as created netdata user was not member of the netdata group. To correct this (or just to be sure) and make this change active run:

sudo synogroup --memberadd netdata netdata
sudo systemctl restart netdata

Netdata is now running on the NAS on port 19999 and it’s web UI can be accessed on that port. Please note that you may need to open your NAS’ firewall to be able to connect to it. Alternatively, you can also use SSH port forwarding (add -L 19999:localhost:19999 to your SSH command and NetData will be available as http://localhost:19999 as long as your SSH session is active).

Move Netdata to Storage [Addition 2025-05-18]

After running NetData for a while and despite being in Thin Client (i.e. streaming) mode, it will fill-up your root partition (the one where DSM lives), which is not good. To prevent this from becoming a problem, I moved NetData to a data volume post installation by running the following commands prior to the installation:

sudo systemctl stop netdata
sudo mv /opt/netdata /volume1/
sudo ln -s /volume1/netdata /opt/
sudo systemctl start netdata

Resolve restricted access to Synology’s Docker

After installation, NetData was unable to get the docker container names from the Docker engine running on my Synology NAS. This was caused by /var/run/docker.sock not being accessible. The easiest solution for this I found was to add user netdata to the group root, which owned the socket with:

sudo synogroup --memberadd root netdata

To make this change changes active run:

sudo systemctl restart netdata

Resolve system_clock_sync_state Alert

For unclear reasons, Synology DSM 7.2.2 does not seem to synchronize the system time with the real-time clock when NTP is enabled. Suggestions were provided in this forum post, which were in the right direction but outdated. To disable this error I found that editing /etc/chrony.conf.user and adding:

rtcsync

would do the trick after restarting chronyd with sudo systemctl restart chronyd the alert was cleared within seconds.

Setup Metric Streaming

As I had my existing setup and did not want the NAS to be busy with monitoring or stream it’s data to the (relatively slow) disks it has, I performed the following configuration changes:

  1. stop the running netdata with: sudo systemctl stop netdata
  2. change to the config directory: cd /opt/netdata/etc/netdata
  3. edit the main config file with sudo ./edit-config netdata.conf and change:
    1. to disable to web UI, add/change in section [web]:
      mode = none
    2. to disable the machine learning, add/change in section [ml]:
      enabled = no
    3. to disable health alerts, add/change in section [heath]:
      enabled = no
  4. create and edit the stream config file with sudo ./edit-config stream.conf and add/change in section [stream]:
    1. enabled = yes
    2. destination = <<YOUR NETDATA PARENT>>:19999
    3. api key = <<YOUR NETDATA STREAM API KEY>>
  5. change ownership and permissions of the created files with:
    1. sudo chgrp netdata netdata.conf stream.conf
    2. sudo chmod 640 netdata.conf stream.conf
  6. start netdata with: sudo systemctl start netdata

Netdata will soon start streaming metrics to you parent / collector server.

Conclusion

Having NetData running on my Synology NAS immediately gives me an insight in what is happening on the NAS out of the box. I still would be interested to see if more sensors area available via other plugins, but the basic metrics provided out of the box are already very useful.

The work is not yet done, as I currently still get 3 alerts for 10min_disk_backlog, this seems to happen more often and is something that can be tweaked according to this bug report. For now I have silenced them and will look into that at a later moment.

Integrating Synology DS with FreeIPA

I recently decided to replace my outdated Synology DS 1010+ NAS (in service 24×7 for over 8 years without major issues) with a new DS 1618+ NAS. Of course the new NAS is a lot faster, has an additional drive bay but to me most important was to replace the hardware and benefit from the newer version of DSM (Synology’s NAS software platform). However, this post is not about my new NAS (there are sufficient other sites describing / testing / comparing these devices).

Of course, now that I am integrating everything with FreeIPA (replacing my MacOS OpenDirectory setup) I also needed the Synology NAS to be fully integrated with FreeIPA. Jack Henschel’s excellent post that gave me some clue’s but wasn’t quite clear in how things worked and what was really needed. The article itself was clear in the steps to take but not everything worked for me immediately so I had to find out why and how to fix that and document that in this post.

Continue reading “Integrating Synology DS with FreeIPA”

Restoring Synology NAS Crashplan existing configuration

In addition to yesterday’s post about running Crashplan on a Synology Disk Station,I thought it was worth mentioning that the key advantage of using PC Load Letter‘s packages is that they nowadays also fully support Crashplan’s auto update feature. So once installed, there is no need to update the package anymore, Crashplan will update itself to the latest version automatically.

Unfortunately this is not visible in Synology’s Package Centre, which hapily shows an updated version of Crashplan is available whenever an updated package is available. Since it is always a good idea to have the latest package installes as it may resolve other issues (i.e. one day autoupdate support started to work now it also it seems to preserve its configuration upon reinstall), it is still a good idea to upgrade every now and then.

One of the key drawbacks of upgrading in the past was that de configuration was lost and the new installation would even become a fresh computer instead of retaining the existing configuration. I had to deal with this several times in the past, normally ending up copying back a backup of the config file manually through an SSH CLI. This did not really work like I wanted as it is manual wotk and felt like a hack, which made me look for the right way to do this. After some searching I found an article on the Crashplan support pages on reconnecting an Existing Backup, which desribes how the GUID of a Crashplan installation (the unique ID that identifies the Crashplan network) can be changes to that of the previous installation so that identity and configuration settings of the previous installation are restored. fo this semi-manual approach. To lookup the GUID of the installation to be restored, one can lookup the GUID from your Crashplan account’s computer overview and selecting the name of the computer, which will also display the GIUD. Follow the instructions to reconnect an Existing Backup.

Recently Crashplan as automated the semi-manual process for Adopting Another Computer  so that the semi-manual process is no longer needed. As described in the Crashplan support page, there is now an option available to adopt another computer after re-installation of the Crashplan client (which is exactly what will happen in case a new version of PC Load Letter‘s package is installed). With this option, restoring all settings has become very easy and since all files are still there, and since all files are still there (no need to restore any files) it only requires a check with the remote systems to ensure everything have already been backed up.
 

Synology DSM 4.0 is out

Today Synology has released version 4.0 of DSM, their (Linux-based) OS for their NASes. As it had some features I wanted to explore (especially VLAN’s, the Antivirus package and "Cloud Station"), I decided to upgrade right away.

Unfortunately the upgrade didn’t work through the built-in update function. I went to the Synology website and tried to download it manually. This failed from the European server, which I suspect would be the reason the built-in update function also didn’t work. I guess there were either problems or all too many European customers tried to upgrade tonight. A manual download from the US server and upload through the web interface worked though and the upgrade process itself went fine.

When I logged in after the upgrade I noticed the revamped GUI that was already announced. So far it seems that Sonylogy as trying to create a more clear distinction between core functionality and packages, which in my opinion a good thing as it means unused packages (like the mail server) can be uninstaled. After the upgrade my Synology DS-1010+ was very busy re-indexing media files and "converting" my photo’s. I wonder what that is for, suspect it is for their photo album and hope it won’t touch my original photo’s.

After the upgrade my Synology DS-1010+ was showing up as a windows machine again in my Mac’s Finder. Fortunately my quick hack still worked, so that was resolved quickly. While working on the command line, I noticed some things changed, notably the ipkg software in /opt was no longer in $PATH, something I need to look into later. Apart from this the upgrade does not seem to have negative side effects.

Finally Synology has added VLAN support, unfortunately not in a very usefull way. It is now possible to specify on which VLAN an interface is so that the packets are tagged correctly. However, it is not possible to create virtual interfaces to have a single interface on more than one VLAN, which kind of means that you cannot do anything more than before (I could setup the VLAN in the switch to achieve the same). Technically everything is possible with VLAN’s now though as under the hood it’s all Linux and using the standard VLAN modules, but it will require a bit of hacking to get it working as desired.

When I wanted to look at the AntiVirus and Cloud station, it turned out that these required me to install a package. That was fine, but it didn’t work (network errors), again too many users or network problems at Synology’s web servers? When I tried a little later it worked though and the AntiVirus package installed without problems, but after that it again told me about network connection problems. I will have a look at the Cloud Station later I guess). The AntiVirus looks like a very neat solution for me having a Linux box scan my NAS over the network on a weekly basis. One can schedule different jobs to scan all or some folders at specific moments. I guess this means the NAS does not support on-access scanning, but that’s something I can live with. It is unclear however how often and when (and from where) the virus definitions are updated, but it looks (based on the messages on the screen and in the logs) that is refreshes this before each scan.

All in all a successful upgrade and definitely promising new features I need to look into further.

Changing the Synology icons for Mac OS X Finder

I have been the happy owner of a Synology DS-1010+ NAS for some time now. The NAS works without problems since I got it and although it took a short while, it fully supports Mac OS X Lion after the last upgrade to DSM 3.2.

One of the things that had annoyed me for some time though, was that on the Mac Finder, the Synology NAS is shown as if it was a Windows host, both for the AFP shares as well as its TimeMachine function. Functionally nothing wrong, but not as I wanted. Since I had been playing with AFP and Avahi on Linux and set this up correctly in the past based on this blog post of Simon Wheatley,I decided to check whether I could achieve the same on my NAS.

Screenshot of Mac Finder after the patchAfter a bit of debugging I found out that the Synology NAS (DSM 3.2) was also using avahi, but that its configuration files were re-generated every time the avahi service was restarted based on the configuration of the NAS. To show the right icons in the finder meant 2 simple changes to the file /usr/syno/etc/rc.d/S99avahi.sh, which changes how the Synology NAS to what is depicted to the right

In the function AddTimeMachine(), one has to add the following just before the </service-group> tag:

  <service>
    <type>_device-info._tcp</type>
    <port>0</port>
    <txt-record>model=TimeCapsule</txt-record>   
  </service>

and in the function AddAFP(), the following must be added just before the </service-group> tag:

  <service>
    <type>_device-info._tcp</type>
    <port>0</port>
    <txt-record>model=Xserve</txt-record>   
  </service>

Next, the avahi service must be restarted/reloaded with the following command:

/usr/syno/etc/rc.d/S99avahi.sh reload

and after logging in again on you Mac the Finder will start showing the right icons (apparently this information is cached).

The resulting S99avahi.sh file for DSM3.2 that can be used as a drop-in replacement is attached to this post.