Skip to content

This plugin will check a lot of different values on your Synology DiskStation.

License

Notifications You must be signed in to change notification settings

cicerops/check_synology

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

check_synology Release

About

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.

Setup

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_synology

Usage

check_synology --help
check_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.

Available modes

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

Example check

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.74c

Icinga 2 integration

For 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.conf

In 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_synology

Development

For setting up a development sandbox, you might want to follow this walkthrough.

Acquire sources:

git clone https://github.com/wernerfred/check_synology
cd check_synology

Install program in development mode into a Python virtual environment:

python3 -m venv .venv
source .venv/bin/activate
pip install --editable=.

Contributors ✨

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!

About

This plugin will check a lot of different values on your Synology DiskStation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%