Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Synology status

Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Rating
31 votes
Favoured:
5
Current Version
2.4
Last Release Date
2016-06-09
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
  • Nagios Fusion
E-mail
Hits
67247
Files:
FileDescription
check_snmp_synologynagios plugin
Synology status
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
New version ! 09.06.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 (22)
byentnx-01, December 2, 2015
1 of 1 people found this review helpful
Hi,

is there any way to change the Port from 161 to another one?

Regards.
Owner's reply

Yes , you can specify the port like that:
./check_snmp_synology -2 public -h 192.168.100.12:10161

I added a comment in the help

byexensio-rori, October 12, 2015
0 of 1 people found this review helpful
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
byaurelien.clavier, July 21, 2015
1 of 1 people found this review helpful
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
...
Owner's reply

I added directy on the script! Thanks

byrct, May 17, 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
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
bythouthou, April 2, 2015
1 of 2 people found this review helpful
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?
Owner's reply

This is the value return by your Synology, there is always a difference between disks (1 or 2 degrees)

For the temperature of your Synology, it's very high. You can try to run:
snmpget -OQne -v 2c -c public SYNOLOGY_IP 1.3.6.1.4.1.6574.1.2.0

1.3.6.1.4.1.6574.1.2.0 ? this is the OID for Synology temperature

And check on web interface the value.

Please review your note...

byGrim, March 16, 2015
1 of 1 people found this review helpful
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.
Owner's reply

Can you try with my new version of the script, please

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 ?
byholiloz, February 3, 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.
Owner's reply

Can you try with my new version of the script ? there is many bug correction and new features

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.
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.
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 :)
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.
bySnafoo, July 9, 2014
Works as advertised.

Any advice on making the complete verbose output display in Nagios?
... so that I can see it in the host list?

Thank you for any hint!

Kind regards
Mirko
bybart, March 6, 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
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.
bych, 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.
bymtominsk, October 14, 2013
1 of 1 people found this review helpful
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
byGldRush98, June 13, 2013
1 of 1 people found this review helpful
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.
Page 1 of 2