Synology NAS Nagios Monitoring

1. Enable SNMPv1/2 service under Synology NAS Control Panel (on Synology DS920+).

2. Download the nagios plugin from https://www.jhoerter.com/download/check_synology-php.html.

3. Copy the plugins to /usr/lib/nagios/plugins.

sudo cp check_synology.php /usr/lib/nagios/plugins

4. Install the check_synology.php plugin's software requirement. 

sudo apt-get install php-snmp

5. Create custom nagios commands (under /etc/nagios4/objects/commands.cfg) as below.

define command{
        command_name    check_synology
        command_line    $USER1$/check_synology.php -H $HOSTADDRESS$ -P 2 -C public -m $ARG1$ -t $ARG2$
        }

6. Create your ups host and service configuration.

define host{
        use                     generic-switch
        host_name               synology_nas1
        alias                   Synology DS920 Plus
        address                 192.168.40.219
        }

define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     Status
        check_command           check_synology!system!status
        }

define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     Temperatur
        check_command           check_synology!system!temperatur -w 40 -c 45
        }

define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     CPU Usage
        check_command           check_synology!cpu!usage -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     Memory Usage
        check_command           check_synology!memory!usage -w 80 -c 90
        }

define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     Disk Status
        check_command           check_synology!disk!status
        }
define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     Raid Status
        check_command           check_synology!raid!status
        }

define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     Disk Usage
        check_command           check_synology!raid!usage -w 70 -c 90
        }

define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     CIFS Connection
        check_command           check_synology!service!cifs
        }

define service{
        use                     generic-service
        host_name               synology_nas1
        service_description     Network Usage
        check_command           check_synology!network!usage
        }

7. Remember to restart your nagios service.

sudo systemctl restart nagios4

8. Check nagios in action.

Comments