A monitoring plugin for checking different values on a Synology DiskStation, compatible with Nagios and Icinga.
The plugin was tested successfully with DS214play, DS215j, DS216+, DS218 and
DS718+ models. For communication, it uses SNMPv3 with MD5 + AES.
If you want to add a missing check or another value, you are most welcome to submit a patch / pull request. As a reference for discovering the right MIBs / OIDs, please have a look at the official Synology DiskStation MIB Guide.
check_synology is based on the easysnmp SNMP library, which is a binding to
the Net-SNMP package. You might need to install the corresponding packages on
your operating system.
An example to invoke the installation on a Debian-based system is:
apt install --yes libsnmp-dev snmp-mibs-downloader
pip install git+https://github.com/wernerfred/check_synologycheck_synology --helpcheck_synology
usage: check_synology [-h] [-w W] [-c C] [-p PORT] hostname username authkey privkey {load,memory,disk,storage,update,status}A custom port can be specified by using -p. The default value is 161.
| mode | description | warning/critical |
|---|---|---|
| load | Checks the load1, load5 and load15 values | if more than w/c in int (only load1) |
| memory | Checks the physical installed memory (unused, cached and total) | if less usable than w/c in % |
| disk | Detects and checks all disks (status, temperature) | if status is "SystemPartitionFailed" or "Crashed", will trigger CRITICAL if temperature is higher than w/c in °C, will trigger WARNING/CRITICAL |
| storage | Detects and checks all disks (free, total, %) | if more used than w/c in % |
| update | Shows the current DSM version and if DSM update is available | if update is "Unavailable", will trigger OK if update is "Available", will trigger WARNING otherwise: UNKNOWN |
| status | Shows model, s/n, temp and status of system, fan, cpu fan and power supply | if temp higher than w/c in °C |
check_synology hostname snmp_user auth_key priv_key load
OK - load average: 1.48, 1.71, 1.74 | load1=1.48c load5=1.71c load15=1.74cFor integrating the check program into Icinga 2, you can use the configuration files
in the icinga2 subdirectory. You can easily acquire the files using:
wget https://raw.githubusercontent.com/wernerfred/check_synology/master/icinga2/synology-command.conf
wget https://raw.githubusercontent.com/wernerfred/check_synology/master/icinga2/synology-services.conf
wget https://raw.githubusercontent.com/wernerfred/check_synology/master/icinga2/synology-host.confIn order to put the check_synology program at the right location aligned with the
definition within synology-command.conf, regardless where it has been installed
on your system, use:
ln -s $(which check_synology) /usr/lib/nagios/plugins/check_synologyFor setting up a development sandbox, you might want to follow this walkthrough.
Acquire sources:
git clone https://github.com/wernerfred/check_synology
cd check_synologyInstall program in development mode into a Python virtual environment:
python3 -m venv .venv
source .venv/bin/activate
pip install --editable=.Thanks goes to these wonderful people (emoji key):
KreativeKrise 💻 |
Nicolai 💻 📦 |
Byolock 💻 🐛 |
Andreas Motl 💻 🤔 💡 |
Thomas Galliker 💻 |
Kraeutergarten 📓 |
Kent Coble 🔌 |
This project follows the all-contributors specification. Contributions of any kind welcome!