Last Updated on January 1, 2023 by Thiago Crepaldi
From previous posts, we have deployed Zabbix Server on a Proxmox container. We also hardened the installation through Let’s Encrypt certificates for the web frontend and TLS encryption for the communication between Server and Agents/Proxies, after all, although encrypted Zabbix Server <-> Agent/Proxy communication with PSK or SSL certificates 🙂
In this post I will cover how to monitor a Synology NAS using Zabbix Agent template. Templates are great because they already pack a bunch of monitoring items, actions, triggers, etc that we would have to add one by one otherwise. Using template is smart because when we need to make changes, we just do it in the template and all hosts that use them will see the new settings. On a manual setup, you would have to make the change in each host, one by one…
Configuring SNMPv3 on Synology NAS
In order to allow the Zabbix Server to monitor your NAS, we need to enable SNMPv3 on it.
After logging in into your NAS, navigate to Control Panel >> Terminal & SNMP and select the tab SNMP. Make sure SNMPv3 is enabled as follows::
- Enable SNMP service
- SNMPv1, SNMPv2c service: unchecked
- SNMPv3 service: checked
- Username: zabbix
- Protocol: SHA
- Password: Pick one password
- Enable SNMP privacy: checked
- Protocol: AES
- Password: Pick one password
- SNMP Device Information
- Device name: Synology hostname
- Device location: Device location or leave empty
- Contact: Contact information or leave empty
Click on Apply and you are done.
Configuring Zabbix Server through Web UI
The template we are going to use doesn’t come installed in Zabbix Server by default, so we are going to import it first. Visit the community template page and navigate to Storage_Devices >> Synology >> template_synology_diskstation_snmpv3 >> 6.0 and click on
template_synology_diskstation_snmpv3.yaml file, followed a click on Raw button. Save the file locally.
Go to Configuration >> Templates and click on Import. Click on Choose file in the configuration dialog, select the YAML file previously saved and click on Import. Another dialog will be displayed with the actual content being imported. Click on Import .
Although we don’t need to install a Zabbix Agent on the Synology, we still need to create a Host on Zabbix Server to specify the NAS address, etc
Go to Configuration >> Templates and click on Create Host button. When the configuration dialog open, the Host tab should be the default one. Fill in the following fields and leave the rest as-is:
- Host
- Host name: Type the Synology hostname
- Templates: Synology DiskStation SNMPv3
- Host Groups: Agentless or whatever describes your Agent
- Interfaces:
- Add a new interface
- Type: SNMP
- IP Address: Type the server IP to be ping’ed
- DNS Name: Type the server FQDN to be ping’ed
- Connect to: Select IP or DNS
- Port: 10050
- Description: Do your thing here
- Monitored by Proxy: (no proxy)
- Add a new interface
- Macros
- Click on Add
- Macro: {$SNMP_AUTHPASS}
- Value: The “Password” created in the previous section
- Description: be creative or leave empty
- Click on Add
- Macro: {$SNMP_PRIVPASS}
- Value: The SNMP Privacy Password created in the previous section
- Description: do your thing
- Click on Add
- Macro: {$SNMP_USERNAME}
- Value: zabbix (or whatever “Username” was created in the previous section)
- Description: leave empty or not
- Click on Add
Finish the host creation by clicking Update.
That is it, let’s try it. Go to Monitoring >> Latest data. In the filter section, type the name of your Synology NAS server in the Hosts box and finally hit Apply. A list of items should be displayed for it, such as Total free memory, etc
That is it, have fun!
I think there is a cut&paste here:
“Go to Configuration >> Templates and click on Create Host button.”
correct should be:
Go to Configuration >> Hosts and click on Create Host button.
I am also wondering why 10050 port is givent here, which is the default port of the Zabbix Agent. Arn’t we using SNMP port 161?
You’re rigth
I am trying to monitor 2 Synology NAS devices using SNMP v2. The template that I am using is called Synology DiskStation.
The issue that I have is if and when the NAS goes down or is offline then I do not get an alert in Zabbix.
I have no clue what I did wrong installing the template and devices.
I then thought that I would add a new ping item so that if the devices are unavailable, they would not respond to ping and then give an offline alert, but when trying to set it up. I cannot find the network interface on either device.
Does anyone have any ideas?
Thanks
Lawrence