Coder Social home page Coder Social logo

check_synology's Introduction

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.