Monitoring a Synology Diskstation with Munin

I have been using Munin to monitor the health of my Raspberry Pi for while now. As I have more devices installed in my network I was looking for a way to monitor these devices as well. As Munin uses a client-server model you are required to install the Munin node on the device to be monitored. Every five minutes the Munin server polls its clients for the values and creates charts using RRDTool.

One of the devices is a network attached storage by Synology I use for backups as well as an external storage for movies, music and other stuff. The Diskstation is basically a server that runs a customized Linux (Diskstation Manager). In various forums I found information about how to set-up the Synology Diskstation as Munin node. An easier way is to use the Simple Network Management Protocol (SNMP). Just activate the SNMP service in the control panel of the Diskstation, give it a community name and you are all set:

Now tell the Munin master the community name, so it can fetch data from the Diskstation. Therefor create a file inside /etc/munin/plugin-conf.d/ folder with the name of the host (e.g. diskstation) containing two lines:


[snmp_diskstation_*]
env.community secret_community_name

The community string acts as password here. One Note: Using the community-based SNMP Version 2 (SNMPv2c) the data is sent in clear text (unencrypted) over the network. It should only be used inside LANs behind firewalls, not in WANs. If secure is an issue you should consider using SNMP Version 3 (SNMPv3).
The Munin master now knows the community name yet is unaware of what data to collect from the device. You can use the command munin-node-configure to discover those:

sudo -u munin munin-node-configure -snmp diskstation -snmpcommunity secret_community_name -shell

Munin now polls the device „diskstation“ using the SNMP-community „secret_community_name“ and shows the corresponding symlinks which have to be added to /etc/munin/plugins. You could either copy and execute them manually or just pipe them using | bash. After creating the symlinks add the following host to your /etc/munin/munin.conf to have the Diskstation appear as separate host. (Note: The IP address has to be the one of the Munin master which does the polling, not the IP address of the Diskstation).


[home.tafkas.net;diskstation]
address 127.0.0.1
use_node_name no

Once added the last step is restarting the Munin node

sudo /etc/init.d/munin-node restart

After a couple of minutes the Munin server fetches the first values, stores them in its RRD files and generates the charts: