Others

Synology status

Description:

this plugin check the health of your Synology NAS
– System status (Power, Fans)
– Disks status
– RAID (Volume) status
– DSM update status
– Temperatures
– Storage percentage of use
– UPS informations

Current Version

2.5

Last Release Date

2016-12-07

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
  • Nagios Fusion

Owner


Project Files
Project Photos
Project Notes
New version ! 07.12.2016 This script check: - System status (Power and Fans) - Disks status - RAID status and now also: - Use SNMPv2 or SNMPv3 - Check for DSM update - Check a NAS with 52 disks max - Check temperature - Check percentage of use of your storages - Display UPS information ./check_snmp_synology --help usage: ./check_snmp_synology [OPTION] -u [user] -p [pass] -h [hostname] options: -u [snmp username] Username for SNMPv3 -p [snmp password] Password for SNMPv3 -2 [community name] Use SNMPv2 (no need user/password) & define community name (ex: public) -h [hostname or IP](:port) Hostname or IP. You can also define a different port -W [warning temp] Warning temperature (for disks & synology) (default 50) -C [critical temp] Critical temperature (for disks & synology) (default 60) -w [warning %] Warning storage usage percentage (default 80) -c [critical %] Critical storage usage percentage (default 95) -i Ignore DSM updates -U Show informations about the connected UPS (only information, no control) -v Verbose - print all informations about your Synology examples: ./check_snmp_synology -u admin -p 1234 -h nas.intranet ./check_snmp_synology -u admin -p 1234 -h nas.intranet -v ./check_snmp_synology -2 public -h nas.intranet ./check_snmp_synology -2 public -h nas.intranet:10161
Reviews (52) Add a Review
Wrong output - disk/raid health
by nscblauensteiner, April 30, 2022

RAID status health not working, disk 11 is faulty. Synology model: "DS3615xs" Synology s/n: "foobar" DSM Version: "DSM 6.2-25556" DSM update: Unavailable System Status: Normal Temperature: 40 (Normal) Power Status: Normal System Fan Status: Normal CPU Fan Status: Normal Number of disks: 12 "Drive 1" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:34 "Drive 2" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:34 "Drive 3" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:34 "Drive 4" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:35 "Drive 5" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:34 "Drive 6" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:35 "Drive 7" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:33 "Drive 8" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:35 "Drive 9" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:34 "Drive 10" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:35 "Drive 11" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:35 "Drive 12" (model: "WD4002FYYZ-01B7CB0") status:Normal temperature:34 Number of RAID volume: 2 "Volume 1" status:Normal 8% used "Storage Pool 1" status:Normal OK - Synology "DS3615xs" (s/n: "foobar", "DSM 6.2-25556") is in good health I tried every edit suggested in the comment section.



Small Error
by rblaas1975, September 30, 2021

If your synology has docker or some similar active the script will fail because it will find multiple /volume1 instances. To prevent this change the line #317 to: (in which you excluded /volume1/ (the last slash and thus only grep /volume1) storageID[$i]=$(echo "$syno_diskspace" | grep "= "?/${storageName[$i]}"?" | grep -v "= "?/volume1/"?" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev)



raid problem on dsm 6
by wpyung, May 31, 2020

This worked for me on DSM 5.2 On DSM 6 I get this error Any ideas ? peter@rcapp04:/srv/docker/volumes/nagios/opt/Custom-Nagios-Plugins$ docker exec -it nagios4 bash root@rcapp04-nagios:/# cd /opt/Custom-Nagios-Plugins/ root@rcapp04-nagios:/opt/Custom-Nagios-Plugins# ./check_snmp_synology -2 public -h rcdata02 -t raid ./check_snmp_synology: line 368: 54 55 58 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 /volume1/@docker /volume1/@docker/btrfs /volume1/@docker/containers/41582c69eb60f17066850470fdfb150a20a445882d30a6083c4fbb59a9b4293c/mounts/shm 8192 Bytes 8192 Bytes 4096 Bytes 2108048671 2108048671 16384 367403977 367403977 367403977 0 * 100 / 54 55 58 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 /volume1/@docker /volume1/@docker/btrfs /volume1/@docker/containers/41582c69eb60f17066850470fdfb150a20a445882d30a6083c4fbb59a9b4293c/mounts/shm 8192 Bytes 8192 Bytes 4096 Bytes 2108048671 2108048671 2108048671 16384 367403977 367403977 0: syntax error in expression (error token is "55 58 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 /volume1/@docker /volume1/@docker/btrfs /volume1/@docker/containers/41582c69eb60f17066850470fdfb150a20a445882d30a6083c4fbb59a9b4293c/mounts/shm 8192 Bytes 8192 Bytes 4096 Bytes 2108048671 2108048671 16384 367403977 367403977 367403977 0 * 100 / 54 55 58 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 /volume1/@docker /volume1/@docker/btrfs /volume1/@docker/containers/41582c69eb60f17066850470fdfb150a20a445882d30a6083c4fbb59a9b4293c/mounts/shm 8192 Bytes 8192 Bytes 4096 Bytes 2108048671 2108048671 2108048671 16384 367403977 367403977 0")



syntax error: invalid arithmetic operator (error token is ".1.3.6.1.2.1.25.2.1.4
by donotclickhere, March 31, 2020

To fix this error I think there should be a space after /${storageName[$i]} in line 317 to prevent the grep for /volume1 also matching /volume10. storageID[$i]=$(echo "$syno_diskspace" | grep "= "?/${storageName[$i]}"?" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev)



Working Plugin
by nishith, March 31, 2020

This plugin works well on DSM 6.2. Below are the commands: ./check_snmp_synology -2 public -h 172.16.1.62 -t disk Number of disks: 4 "Drive 1" (model: "WD2RX-68EUZN0 ") status:Normal temperature:28 "Drive 2" (model: "WD2RX-68EUZN0 ") status:Normal temperature:29 "Drive 3" (model: "WD2RX-68EUZN0 ") status:Normal temperature:29 "Drive 4" (model: "WD2RX-68EUZN0 ") status:Normal temperature:29 ################################ ./check_snmp_synology -2 public -h 172.16.1.62 -t temperature Temperature: 40 (Normal) OK - Synology is in good health ################################ ./check_snmp_synology -2 public -h 172.16.1.62 -t system Synology model: "DS918+" Synology s/n: "" System Status: Normal OK - Synology is in good health ################################



Added more UPS stats, performance data
by cottington, December 31, 2019

Added additional UPS OIDs/stats, added output for performance data for system temperature and UPS Link: https://github.com/cottington/nagios-Synology



SNMPGET Correction
by Dermone, September 30, 2019

Update of the improvement of Corben2 correction and optimisation of snmpwalk. Link : https://github.com/Dermone/nagios-Synology Correct this error : /check_snmp_synology: line 227: [: : integer expression expected /check_snmp_synology: line 227: [: : integer expression expected /check_snmp_synology: line 227: [: : integer expression expected



Updated for 6.2, splitted up check types.
by corben, April 30, 2019

Script works well. I've made some changes to it though. I changed it to correctly get the volume usage in DSM 6.2, and I've changed it to split up the check types so that different checks can be different services in Nagios. My changed version can be found here: https://github.com/corben2/check_snmp_synology



Timeout fix
by rez99, April 30, 2019

As per PiotrM89's suggestion back in 2017, using snmpbulkwalk fixed my timeout issues. Try changing the following on Line 25 SNMPWALK=$(which snmpwalk) to SNMPWALK=$(which snmpbulkwalk)



This product works great 90% of the time
by chris1337c, March 31, 2019

I would give this an excellent rating, but this is the only plugin out of 56 hosts that gives me any grief. I get the random SNMP timeouts sporadically throughout the day. I have investigates a rolling tcp dump to see if its on the network end, its not (as 30+ other hosts are in the same data center and do not have this issue, plugged into the same switch, with the same load balancing issues). I even disabled the dual NIC on the Synology RS2414RP+ (DSM 6.0.3-8754 Update 8) to see if somehow the load balancing or something goofy was hanging it up. Not it either, I see someone below me has the identical issue. I have tried disabling different aspects of this plugin as well to see if these stop, they don't. These spam repeatedly: (Service check timed out after 180.01 seconds) (Service check timed out after 180.01 seconds) (Service check timed out after 180.01 seconds) After expanding to 180s I figured this would resolve the issue, it didn't either. I love the visibility it gives, I just feel like its getting hung up on something.



Minor bugs, patch in review...
by wyang, January 31, 2019

--- /usr/lib64/nagios/plugins/check_snmp_synology~ 2018-12-07 19:11:35.231831343 +0000 +++ /usr/lib64/nagios/plugins/check_snmp_synology 2019-01-30 21:23:40.471135880 +0000 @@ -307,3 +307,8 @@ - RAIDName[$i]=$(echo "$syno" | grep $OID_RAIDName.$(($i-1)) | cut -d "=" -f2) - RAIDStatus[$i]=$(echo "$syno" | grep $OID_RAIDStatus.$(($i-1)) | cut -d "=" -f2 | sed 's/^[ t]*//;s/[ t]*$//') - + # modified by William Yang / DataPulse + # the regexes below were not anchored on the tail end, which created situations where + # a record could contain multiple lines. Caused a lot of heartache. Adding the + # anchor [^.0-9] ensures no subsquent numeral or OID component is matched, causing + # the code to be much more resilient. We added 10 volumes one maintenance window, + # and we had to track this down.... + RAIDName[$i]=$(echo "$syno" | grep "$OID_RAIDName.$(($i-1))[^.0-9]" | cut -d "=" -f2) + RAIDStatus[$i]=$(echo "$syno" | grep "$OID_RAIDStatus.$(($i-1))[^.0-9]" | cut -d "=" -f2 | sed 's/^[ t]*//;s/[ t]*$//') @@ -317,0 +323,2 @@



No longer working since latest DSM update
by fwerbinek, January 31, 2019

This plugin used to work very well for many different Syno models. But since the update to DSM 6.2-23824, the requests via this plugin seem to take forever, and we get timeouts for all NAS systems. Can this please be analyzed and the plugin updated?



Great plugin if you have under 52 disks
by alsosza, December 31, 2018

I am giving this a not perfect score and would change it in a heartbeat if the max number of disks were updated to support 52. I was able to monitor health of the device and disks of a few of my devices, but the majority of our devices have more than 52 disks.



Does not work on 6.2
by ladinek, November 30, 2018

I am using this plugin with success on many Nagios instances. However now I tried it against RS818+ with 6.2-23824, and getting error same as man_al describes: CRITICAL - Problem with SNMP request, check user/password/host Analyzing this problem, SNMPWALK runs up to.1.3.6.1.4.1.6574.5.1.1.8.9 = 2, then times out. Timeout: No Response from which following test evaluates as error and exits with exit code 2.



Error running on latest DSM
by paprika, October 31, 2018

I am getting an error trying to run this on a NAS with 12 disks. ./check_snmp_synology: line 227: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 288: [: : integer expression expected ./check_snmp_synology: line 324: 36 37 38 39 40 51 52 53 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 /tmp /run /dev/shm /sys/fs/cgroup /run/cgmanager/fs /volume2 /volume1 /volume3 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 502328 502328 502328 1 25 1449963710 959068290 959019398 308048 5815 16191 1 0 0 22540 601869912 30464948 * 100 / 36 37 38 39 40 51 52 53 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 /tmp /run /dev/shm /sys/fs/cgroup /run/cgmanager/fs /volume2 /volume1 /volume3 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 596382 502328 502328 502328 1 25 1449963710 959068290 959019398 5815 16191 1 0 0 22540 601869912 30464948: syntax error in expression (error token is "37 38 39 40 51 52 53 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 /tmp /run /dev/shm /sys/fs/cgroup /run/cgmanager/fs /volume2 /volume1 /volume3 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 502328 502328 502328 1 25 1449963710 959068290 959019398 308048 5815 16191 1 0 0 22540 601869912 30464948 * 100 / 36 37 38 39 40 51 52 53 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 .1.3.6.1.2.1.25.2.1.4 /tmp /run /dev/shm /sys/fs/cgroup /run/cgmanager/fs /volume2 /volume1 /volume3 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 4096 Bytes 596382 502328 502328 502328 1 25 1449963710 959068290 959019398 5815 16191 1 0 0 22540 601869912 30464948")



After update to DSM 6.2 Plugin does not work
by man_al, July 31, 2018

The plugin works very fine - but since we've been updated to DSM 6.2-23739 on our RS3614xs+ we get the following message: ./check_snmp_synology -2 public -h 192.168.x.x CRITICAL - Problem with SNMP request, check user/password/host SNMP Community is right and snmpwalk works. Any idea?



Nice Plugin
by steve, June 30, 2018

I'd be interested in your code changes fledorze, removing/ignoring elements may help with the some of the timeout issues.



Nice plugin
by fledorze, June 30, 2018

I added more generic options -r and -e to include/exclude elements, in replacement of -i option that allows to ignore DSM updates only. Tell me if you want the code.



HELP INSTALL
by JSYOR, May 31, 2018

Could someone please write a step by step guide to get this installed on a nagios core ubuntu server please thanks.



nice plugin
by MrZylinder, May 31, 2018

Quite a nice plugin to use and works fine. I modified it by adding perfdata for system temperature, volume usage, cpu usage and mem usage aswell additional arguments for cpu und mem usage thresholds.



Wonderful!!
by Crisis, February 28, 2018

It works perfectly!! Thank you a lot!



Faster script execution
by PiotrM89, December 31, 2017

I suggest to change snmpwalk to snmpbulkwalk in script. An execution of the script will be a much faster.



Volume free space is not working.
by peepo, December 31, 2017

Not sure if this is still any use to anyone but I fixed the missing volume disk space bug by removing a $ symbol from line 317. Original Line: storageID[$i]=$(echo "$syno_diskspace" | grep "= "?/${storageName[$i]}$"?" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev) Replaced with: storageID[$i]=$(echo "$syno_diskspace" | grep "= "?/${storageName[$i]}"?" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev) I am not sure if this will break anything else but it seems to be doing what I need it to now.



Fix for correct volume disk usage reporting
by marko.itaf, December 31, 2017

For anybody else who has a problem with the correct volume usage reporting, open the script and replace the line 317: storageID[$i]=$(echo "$syno_diskspace" | grep "= "?/${storageName[$i]}$"?" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev) with this: storageID[$i]=$(echo "$syno_diskspace" | grep "= "/${storageName[$i]}"" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev) and you should now get the correct volume usage (in percent) and the correct return state (depending on your -w and -c parameters).



Volume free space - no warnings and error
by nkd, November 30, 2017

Volume free space is not working. Status is always Normal. We are using this call: check_snmp_synology -u my_user -p my_pass -h my_host -v -i Also I tried call like this: check_snmp_synology -u my_user -p my_pass -h my_host -w 85 -c 90 -v -i verbose output: Synology model: "RS3617xs+" DSM Version: "DSM 6.1-15152" DSM update: Available System Status: Normal Temperature: 32 (Normal) Power Status: Normal System Fan Status: Normal CPU Fan Status: Normal Number of disks: 12 "Disk 1" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:29 "Disk 2" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:27 "Disk 3" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:27 "Disk 4" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:27 "Disk 5" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:30 "Disk 6" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:28 "Disk 7" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:27 "Disk 8" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:28 "Disk 9" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:31 "Disk 10" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:28 "Disk 11" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:28 "Disk 12" (model: "WD4001FFSX-68JNUN0 ") status:Normal temperature:28 Number of RAID volume: 1 "Volume 1" status:Normal OK - Synology "RS3617xs+ is in good health NAS storage is on 92%. Also I check on 4 NAS different models: Synology model: "RS3617xs+" Synology model: "RS2414+" Synology model: "RS2212+" Synology model: "RS3412xs" With 2 different DSM: DSM Version: "DSM 6.1-15152" DSM Version: "DSM 6.1-15047" Did some one find solution for this?



Volume free space not working?
by iom100uk, October 31, 2017

We've been using this for a while, but we've just noticed that the volume space doesn't seem to raise warnings (just status:Normal) : Here's the verbose output. Synology model: "RS3614xs+" Synology s/n: "1620M9N181700" DSM Version: "DSM 6.1-15152" DSM update: Available System Status: Normal Temperature: 42 (Normal) Power Status: Normal System Fan Status: Normal CPU Fan Status: Normal Number of disks: 12 "Disk 1" (model: "ST6000VN0001-1SF17Z ") status:Initialized temperature:41 "Disk 2" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:42 "Disk 3" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:42 "Disk 4" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:40 "Disk 5" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:42 "Disk 6" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:42 "Disk 7" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:42 "Disk 8" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:41 "Disk 9" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:41 "Disk 10" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:42 "Disk 11" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:42 "Disk 12" (model: "ST6000VN0001-1SF17Z ") status:Normal temperature:40 Number of RAID volume: 2 "Volume 1" status:Normal "Disk Group 1" status:Normal WARNING - Synology "RS3614xs+" (s/n: "1620M9N181700", "DSM 6.1-15152"), DSM update available According to the web interface of the device, volume on is 93% full. Any ideas?



Excellent plugin
by uberjew666, October 31, 2017

First of all, fantastic plugin. Very extensive. However I found an issue with it. When polling a device running DSM 6.1, it returns integer expression expected. Breaking the script down, the syno variable isn't populated. Basically, snmpget times out. This appears to be due to amount of OIDs I'm querying. There is 12 disks in the system so there is around 50+ oids. I kept rerunning snmpget, removing a oid until it returned data and it was around 42. Using Ubuntu 16.04, snmpget 5.7.2



Grat plugin
by Ricos-web, December 31, 2016

Problems are fixed fast.



No Output on Stdout
by KRVS, October 31, 2016

Hello! I have some problems with this script, it seems something it's wrong, shows me the advise: "(No output on stdout) stderr: /usr/local/nagios/libexec/check_snmp_synology: line 323: 53" What's wrong? Thanks!!!



CRITICAL - Problem with SNMP request
by nils50122, October 31, 2016

When i use the script with your command and snmpv3 and my DS411 with DSM 6.0.2 there comes the following error: "CRITICAL - Problem with SNMP request" try many things, but i think its a bug in your check_snmp_synology. And yes, i use your newest version.



Different Port
by entnx-01, December 31, 2015

Hi, is there any way to change the Port from 161 to another one? Regards.



Minor improvements added
by exensio-rori, October 31, 2015

The plugin works great! I had some requirements which the plugin didn't meet. Therefore, I have added some minor improvements such as separated command line options for DSM Update and enable performance data, etc. The author didn't respond to my mail. Therefore, I have published my version on GitHub, see: https://github.com/exensio/synology-nagios-plugin



Excellent plugin !
by aurelien.clavier, July 31, 2015

Thank you for this plugin ;) I modify it in order to ignore DSM updates. It works perfectly. These are the lines for add option -I to ignore DSM updates : ... case $DSMUpgradeAvailable in "1") DSMUpgradeAvailable="Available"; healthWarningStatus=1; updateMessage="DSM update available";; "2") DSMUpgradeAvailable="Unavailable"; healthWarningStatus=0; updateMessage="Update unavailable";; "3") DSMUpgradeAvailable="Connecting"; healthWarningStatus=0; updateMessage="Update in progress";; "4") DSMUpgradeAvailable="Disconnected"; healthWarningStatus=1; updateMessage="DSM Update Disconnected";; "5") DSMUpgradeAvailable="Others"; healthWarningStatus=1; updateMessage="Check DSM Update";; esac if [ "$ignoreUpdate" = "yes" ] ; then healthWarningStatus=0; healthString="$healthString, Info : $updateMessage"; else healthString="$healthString, $updateMessage"; fi ... and on the last lines, I modify the output for Ok status : ... if [ "$healthCriticalStatus" = "0" ] && [ "$healthWarningStatus" = "0" ] ; then echo "OK - $healthString Appliance is in good health" exit 0 fi ...



Requests
by rct, May 31, 2015

Hello, Your plugin works rather fine but I have a problem: when I mount an USB drive. The USB drive is mounted in the /volume1/usbdrive and the script fails. We have a recurring warning from your plugin saying that DSM update is disconnected. I think that's because Synology has its servers down. People can have the Syno out of network so I think it will be nice to be able to disable this warning. Another request: will it be possible to only select some tests? For example I will be interested in no dsm update tests or different volumes warning/critical levels... Thank you for the plugin



problem after adding 10th volume
by martinus, May 31, 2015

nice plugin, monitoring two RS3412, until today without problems. today added another volume (the 10th) and script says now: ./check_snmp_synology: line 307: 49 .1.3.6.1.2.1.25.2.1.4 /volume10 4096 Bytes 438650334 648744698 3576310 * 100 / 49 .1.3.6.1.2.1.25.2.1.4 /volume10 4096 Bytes 1032116978 438650334 3576310: syntax error: invalid arithmetic operator (error token is ".1.3.6.1.2.1.25.2.1.4 /volume10 4096 Bytes 438650334 648744698 3576310 * 100 / 49 .1.3.6.1.2.1.25.2.1.4 /volume10 4096 Bytes 1032116978 438650334 3576310") tried to find on myself, but as not a programer, no chance.. :) any help very appreciated, regards martin



Temperature always critical
by thouthou, April 30, 2015

Very strange value for temperature: Synology model: "RS814" Synology s/n: "14A0LZN498800" DSM Version: "DSM 5.1-5022" DSM update: Unavailable System Status: Normal Temperature: 72 (CRITICAL) Power Status: Normal System Fan Status: Normal CPU Fan Status: Normal Number of disks: 4 "Disk 1" (model: "WD40EFRX-68WT0N0 ") status:Normal temperature:39 "Disk 2" (model: "WD40EFRX-68WT0N0 ") status:Normal temperature:40 "Disk 3" (model: "WD40EFRX-68WT0N0 ") status:Normal temperature:40 "Disk 4" (model: "WD40EFRX-68WT0N0 ") status:Normal temperature:38 Number of RAID volume: 1 "Volume 1" status:Normal 40% used What is the difference with disk values?



CRITICAL - Problem with SNMP request
by Grim, March 31, 2015

I can do a SNMP walk but I always get the next error: CRITICAL - Problem with SNMP request I already tried with different Synology's.



issue when launching check_snmp_synology
by jrauly, February 28, 2015

Hello, Im sorry I am a very beginner in nagios. I paste your script into /usr/local/nagios/libexec but when I execute ./check_snmp_synology -h myip I got -bash: ./check_snmp_synology: No files or folders of this type Could you please help me ?



Same problem
by holiloz, February 28, 2015

Hello Jan, I have the same problem. My Synology displays: WARNING - Synology "RS2414rp+" (s/n: "XXXXXXXXXX", "DSM 5.1-5022") needs to be updated. Could you please explain to me, how do you have solved the problem ? What do you have change between line 119 to 123 ? Thanks for your answer.



Update Status
by jan.koch@maritzcx.com, January 31, 2015

Hello, great usefull plugin... there is perhabs a bug. for the parameter OID_upgradeAvailable set you between line 119 to 123 all status of the parameter healthStatus on 3. This give all time a warning to do updates. I changed in a other version for me that only by the status updates available the warning comes to do the updates.



Nice plugin, RAID status fixed
by terminal, November 30, 2014

Thanks for the plugin! The RAID status did not work for me at first, you can find a fix at http://pastebin.com/tubJnGxi. Most of the diff stems from the corrected intendation. Basically I just put a for loop around outputting the RAID status.



Works well - added some functionality
by j.groen@syso.it, October 31, 2014

Good plugin, works well! I added a few things to the plugin: - Read DSM update status, flags a warning when DSM is out of date - Connects via SNMP v3 (more secure) - When using verbose mode the plugin will now first output the device status. This give you a better oversight in the WebUI. Script can be find here: http://pastebin.com/THUfEuNy Have fun :)



A little help please...
by craigfewspelican, August 31, 2014

I don't suppose someone could show me their entry into the .cfg file they use please ? Still new to this and would really like to monitor the DiskStation in our office. Thank you.



Multi-line output
by Snafoo, July 31, 2014

Works as advertised. Any advice on making the complete verbose output display in Nagios?



Great Plugin, but how to implement in icinga
by BODAN-IT, July 31, 2014

... so that I can see it in the host list? Thank you for any hint! Kind regards Mirko



Hot spare
by bart, March 31, 2014

I have tested it with DS1511+ and DSM4.3 and it works (you can update your testes list if you like). I have 1 disk marked as hot spare, which has status Initialized, which is fine. The script reported this as Critical in Nagios so I modified it not to do that. Thanks for the script! Cheers



Nice and clean bash script but modifications are needed
by ronator, February 28, 2014

I must agree with user rrubel: considering a non initialized hot spare as a critical error is just plain wrong. So thanks go to user mtominsk for pointing out the lines of code that needed to be changed. And just to be fair with all respect to the Nagios Plugin Developing Guideline: this check totally lacks a critical and a warning switch which would really make sense when monitoring temperatures. So I really cannot consider this as a "good" nagios plugin, only average, because I cannnot define any limits. But it is still a good starting point for people who do not fear bash scripts. Sadly, the author does not seem to be very active so be prepared to make your own changes to the script. Successfully tested and used on Ubuntu 10.04.4 TLS with Nagios Core 3.2 and a Synology RS3412RPxs in Cluster-Mode.



Error on RAIDStatus
by ch, October 31, 2013

Unfortunately i didn't get ist to work. a-team@nagios:/usr/lib/nagios3$ ./check_synology -h shiva ./check_synology: line 29: syntax error near unexpected token `(' The line 29 in the script is: ./check_synology: line 29: `OID_RAIDStatus="1.3.6.1.4.1.6574.3.1.1.1" usage() {' OID_RAIDStatus="1.3.6.1.4.1.6574.3.1.1.1" usage() { It would be nice if anybody can give advise.



Very nice plugin
by mtominsk, October 31, 2013

Very useful plugin. Because Synology changed the way how spare disks are handled, I had to make some changes regarding the "initialized" Status which is interpreted as critical. Here are my changes on your script, maybe useful for one or two: if [ "${diskStatus[$i]}" != "1" ] && [ "${diskStatus[$i]}" != "2" ] ; then # if [ "${diskStatus[$i]}" = "2" ] ; then diskStatus[$i]="Initialized"; fi if [ "${diskStatus[$i]}" = "3" ] ; then diskStatus[$i]="NotInitialized"; fi if [ "${diskStatus[$i]}" = "4" ] ; then diskStatus[$i]="SystemPartitionFailed"; fi if [ "${diskStatus[$i]}" = "5" ] ; then diskStatus[$i]="Crashed"; fi healthStatus=2 healthString="$healthString, problem with ${diskID[$i]} (model:${diskModel[$i]}) status:${diskStatus[$i]} temperature:${diskTemp[$i]} C " elif [ "${diskStatus[$i]}" = "2" ] ; then diskStatus[$i]="Initialized"; else diskStatus[$i]="Normal" fi if [ "$verbose" = "yes" ] ; then echo "${diskID[$i]} (model:${diskModel[$i]}) status:${diskStatus[$i]} temperature:${diskTemp[$i]} C" ; fi done



Comprehensive Synology SNMP Checks
by GldRush98, June 30, 2013

Great plugin! Checks all of the vital statistics and properly returns status codes to Nagios. All it took to get working was turning SNMP on in the Synology settings.



On FreeBSD
by ld50, May 31, 2013

If you're using FreeBSD (maybe OS X) as Nagios server there are a few changes that are needed to get this working. First change the location of bash, snmpwalk and snmpget in the file. bash is located /usr/local/bin/bash snmpwalk /usr/local/bin/snmpwalk snmpget /usr/local/bin/snmpget FreeBSD uses 'jot' instead of 'seq' so change all occurrences of seq to jot. Jot has a slightly different syntax. e.g. change line 76 for i in `seq 1 $nbDisk`; to for i in `jot - 1 $nbDisk`; mh



Very nice, but needs minor tweaks
by rrubel, May 31, 2013

This tool provides pretty much all the status information you can get from your Synology box when run in Verbose mode, or has a nice single-line summary in normal mode. I'm using this on an 1812+. Two comments though: -- the location of snmpwalk and snmpget are hard-coded into the script so the script won't run if your system installs them in a different location, and there's not a good error message telling you they can't be found. I replaced those lines with a call to 'which snmpwalk' and 'which snmpget' which will at least pick up a version somewhere on your path. -- The section that monitors disk health is too strict when determining status. Drives that are set up as hot spares don't have to be "normal" -- they can be just initialized or even uninitialized and not be considered a failed unit. I had to modify that section as well to prevent critical failures due to the hot spare drives. At the least, those shouldn't be critical errors. Otherwise, this is a useful and informative plugin.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.3 (70)
Favorites
11
Views
203,705