Monitor a Synology NAS with Munin

       424 words, 2 minutes

My Synology DiskStation DS409slim is, via the DSM software, SNMP aware. This means I can poll it to get some information using a SNMP capable monitoring system. This is how I configured Munin to grab some metrics from the NAS.

Enabling SNMP on the NAS

By default, the SNMP service is not enabled. So, first of all, you’ll need to enable it:

In case you’re not sure about how to fill the blanks, you’d better read first about SNMP. Every fields but the “community” one are informative text. You can put whatever you want. Although you should indicate useful information. The “community” entry is some kind of password. This information will be required by the SNMP client process that will connect to the NAS to get the information.

That’s all.

Configure Munin

I will expect you to have an already working Munin server. If you do not have one, you shall read this article.

There was only a missing part for SNMP polling that was solved by adding to correct OpenBSD package:

# pkg_add p5-Net-SNMP-6.0.1p0.tgz

Configuration files

Check that the server’s munin-node allows polling from it’s “public IP”. This is the IP that shall be used by Munin to connect to the remote NAS. What I did was:

# vi /etc/munin/munin-node.conf
allow ^192\.168\.0\.5$

Then, configure Munin to poll the NAS. This is done by adding the target to the configuration file:

# vi /etc/munin/munin.conf
[synology]
address 192.168.0.5

Note that the IP is the one from the Munin server, not the NAS one. This is because we are going to poll using SNMP and not the Munin client.

Configure Munin to use the community configured previously. In my case, I use the same community for all of my (not so many) hosts. You may want to configure various community:

# vi /etc/munin/plugin-conf.d/openbsd-packages
[snmp_*]
env.community c0mmunity

Plugins

Run the following command to learn what Munin can do:

# sudo -u _munin munin-node-configure -snmp synology -snmpcommunity c0mmunity -shell

Either pass the "| sh" to the previous command or manually create your links to modules. There were some Windows related plugins that were proposed ; and that I didn’t installed.

Reload, wait and see

Everything should be now configured properly. Reload the munin-node and wait for the poll and the graph to occur:

# /etc/rc.d/munin_node restart

That’s All Folks!