Monitor Synology storage devices (SNMP add-on)

Get detailed information through SNMP

Know when a disk fails, a volume is degraded or running out of available free space. Synology devices supports SNMP and offers info about health of volumes and available space left, but in a format that requires a lot of effort to parse correctly.

Use the Panorama9 package for Synology to extend the built-in SNMP solution with easy to consume info.

Once the package is installed the device will automatically be detected by the Panorama9 system and you don't have to do anything else besides the installation. If used without an Panorama9 account you may still benefit from the extra information you can extract.  

Installation requirements

Default the Synology device only allows installation of packages signed by Synology. To install the Panorama9 package you must configure the Synology device to accept third-party package publishers.

Login to the Synology administration interface (http://IP_ADDRESS:5000) and navigate to Package Center ->Settings -> General -> Choose "Any Publisher" under "Trust Level".

You can revert to the default trust level once the Panorama9 package has been installed.

The Panorama9 package requires Perl, and it must be installed before the P9 package. Perl can be found in the "Package Center". Just enter "Perl" in the search box to quickly locate the package.

 

 

Install the Panorama9 package for Synology

To install the Panorama9 package for Synology download the "synology_p9.spk" file, login to the Synology administration interface and open the "Package Center". Click on the "Manual install" button and choose the file you just downloaded.

 

Once installed the Panorama9 system will automatically detect your Synology device (allow up to 24 hours before the device is shown in the Dashboard, since the Panorama9 Cloud will only try to determine hardware type once per day).

An issue will be generated if a volume or disk isn't healthy or free space left is critical low. Through the Panorama9 Dashboard you are also able to view the serial number, model, plot usage graphs etc.

 

Note: You must re-install the package every time you update the SNMP configuration through the Synology administation interface. Any changes will overwrite the the Panorama9 settings. 

What the package changed

The Panorama9 package adds the following 2 lines to "snmpd.conf":

sysDescr Linux DiskStation 2.6.32.12 #1955 Sat Nov 26 14:50:54 CST 2011 armv5tel GNU/Linux synology_88f6281_210j - synology nas (extend p9)
extend p9 /usr/syno/synoman/webman/3rdparty/p9/disk_info.pl

Note that the above "sysDescr" will change to match your type of Synology hardware.

The SNMP service will run a script (included with the Panorama9 package) that analyzes the configured disks and volumes.

SNMP query example

To query and view the extended SNMP output use your favourite SNMP tool, e.g. "snmwalk" (remember to replace command line options with relevant info about your device, such as IP address):

# snmpwalk -Ot -c public -v 1 192.168.0.10 1.3.6.1.4.1.8072.1.3.2
NET-SNMP-EXTEND-MIB::nsExtendNumEntries.0 = INTEGER: 1
NET-SNMP-EXTEND-MIB::nsExtendCommand."p9" = STRING: /usr/syno/synoman/webman/3rdparty/p9/disk_info.pl
NET-SNMP-EXTEND-MIB::nsExtendArgs."p9" = STRING:
NET-SNMP-EXTEND-MIB::nsExtendInput."p9" = STRING:
NET-SNMP-EXTEND-MIB::nsExtendCacheTime."p9" = INTEGER: 5
NET-SNMP-EXTEND-MIB::nsExtendExecType."p9" = INTEGER: exec(1)
NET-SNMP-EXTEND-MIB::nsExtendRunType."p9" = INTEGER: run-on-read(1)
NET-SNMP-EXTEND-MIB::nsExtendStorage."p9" = INTEGER: permanent(4)
NET-SNMP-EXTEND-MIB::nsExtendStatus."p9" = INTEGER: active(1)
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."p9" = STRING: OK - SYSTEM, model: DS210jv30-j, ser: X8Y6Z12345, hn: DiskStation, fw: 3.2-1955, disks: 2, up: 279611
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."p9" = STRING: OK - SYSTEM, model: DS210jv30-j, ser: X8Y6Z12345, hn: DiskStation, fw: 3.2-1955, disks: 2, up: 279611
OK - RAID, md2 raid1 [UU] 2/2 (A:sda5,sdb5 F:none S:none), size: 1918200920, free: 1168303984, name: /volume1
OK - RAID, md1 raid1 [UU] 2/2 (A:sda2,sdb2 F:none S:none)
OK - RAID, md0 raid1 [UU] 2/2 (A:sda1,sdb1 F:none S:none)
OK - HD, model: Hitachi HDS722020ALA330, size: 2000398934016, serial: XYZ123409876, temp: 31, dev: sda
OK - HD, model: Hitachi HDS722020ALA330, size: 2000398934016, serial: ZYX432167890, temp: 30, dev: sdb
NET-SNMP-EXTEND-MIB::nsExtendOutNumLines."p9" = INTEGER: 6
NET-SNMP-EXTEND-MIB::nsExtendResult."p9" = INTEGER: 0
NET-SNMP-EXTEND-MIB::nsExtendOutLine."p9".1 = STRING: OK - SYSTEM, model: DS210jv30-j, ser: X8Y6Z12345, hn: DiskStation, fw: 3.2-1955, disks: 2, up: 279611
NET-SNMP-EXTEND-MIB::nsExtendOutLine."p9".2 = STRING: OK - RAID, md2 raid1 [UU] 2/2 (A:sda5,sdb5 F:none S:none), size: 1918200920, free: 1168303984, name: /volume1
NET-SNMP-EXTEND-MIB::nsExtendOutLine."p9".3 = STRING: OK - RAID, md1 raid1 [UU] 2/2 (A:sda2,sdb2 F:none S:none)
NET-SNMP-EXTEND-MIB::nsExtendOutLine."p9".4 = STRING: OK - RAID, md0 raid1 [UU] 2/2 (A:sda1,sdb1 F:none S:none)
NET-SNMP-EXTEND-MIB::nsExtendOutLine."p9".5 = STRING: OK - HD, model: Hitachi HDS722020ALA330, size: 2000398934016, serial: XYZ123409876, temp: 31, dev: sda
NET-SNMP-EXTEND-MIB::nsExtendOutLine."p9".6 = STRING: OK - HD, model: Hitachi HDS722020ALA330, size: 2000398934016, serial: ZYX432167890, temp: 30, dev: sdb

 

Abbreviations used in output:

SYSTEM:

  • ser: - serial number of device
  • hn: - hostname of device
  • fw: - firmware version
  • up: - time since boot (seconds)

RAID:

  • 2/2 - number of disks online vs. total number of disks configured to be part of the RAID
  • A: - active disks
  • F: - failed disks
  • S: - spare disks
  • size: - volume size in KB (not displayed for RAID md0 and md1)
  • free: - available free volume space in KB (not displayed for RAID md0 and md1)
  • name: - name of mounted volume (not displayed for RAID md0 and md1)
HD:
  • model: - physical hard disk vendor and model
  • size: - size (bytes)
  • serial: serial number
  • temp: disk temperature (celsius)
  • dev: device name
 

Nagios compatible output

The output is compatible with Nagios and is easy to integrate with the SNMP plugin. Status may be any of 'OK', 'WARNING', 'CRITICAL', 'UNKNOWN' or 'DEPENDENT'.

 

Last updated:

Comments

  • Avatar
    Allan

    Updated package to version 1.1

    Changelog:

    • Rewrite of logic that maps physical disks to RAID volumes
    • Added info about serial number of physical disks
    • Better support of single or multi bay DiskStation models
  • Avatar
    Alexandre Nizoux

    Neat, thanks a lot. :)

  • Avatar
    Aatash Patel

    Hi Allan, would it still work if I use a different community string than public?

  • Avatar
    Allan

    @Aatash Patel

    Yes, the add-on will work with any community string.

  • Avatar
    Dave Miles

    This is interesting stuff, and I can get it to work, from the LInux command line on my Nagios Servers, using snmpwalk, but when I use the check_snmp plugin as suggested above the following happens

    ./check_snmp -H defdevnas05.defdev.local -C public -P 1 -o .1.3.6.1.4.1.8072.1.3.2

    External command error: Error in packet

    Reason: (noSuchName) There is no such variable name in this MIB.

    Failed object: iso.3.6.1.4.1.8072.1.3.2

    Any Clues anyone..............

  • Avatar
    Allan

    @Dave Miles

    You need to point to an OID where ./check_snmp should inspect the output, e.g.:

    ./check_snmp -H defdevnas05.defdev.local -C public -P 1 -o NET-SNMP-EXTEND-MIB::nsExtendOutLine."p9".1

  • Avatar
    Rogério Costa

    Dave Miles, please add a ''0'' in your MIB.

     ./check_snmp -H defdevnas05.defdev.local -C public -P 1 -o .1.3.6.1.4.1.8072.1.3.2.0

  • Avatar
    James Smith

    Hi,

    First of all, thanks for this very useful tool. It has helped me a great deal. However, recently on some Synology NAS devices (e.g. DS413), I have been getting problems with this add-on.

    SNMP output gives me the following error from the script: NET-SNMP-EXTEND-MIB::nsExtendOutLine."p9".1 = STRING: env: perl: No such file or directory

    I am guessing Synology has updated something and the operating system cannot locate perl in the way that it is set in the shebang of the script.

    What could be done?

     

    Thanks in advance!

  • Avatar
    IT-Man

    @ James

    Sorry for this late reply - didn't see you post before now.

    Perhaps there is an issue with the perl implementation, but difficult to know without access to a box with the problem. If still interested we would gladly debug the problem (and if needed update the Synology package) if you can provide us with access e.g. a DS413 storage device.

    Please contact us directly using email address da-at-panorama9.com

  • Avatar
    James Smith

    @Claus

    Thank you for your response!

    I was able to solve the problem already. Sorry for not writing a solution here right away.

    The problem occurred because since DSM 4.2 the systems do not come bundled with the perl module, so it has to be installed separately from the Package Center.

     

  • Avatar
    Mark Kennedy

    James, thank you for your post. I've been fighting this issue for 3 weeks.  

  • Avatar
    IT-Man

    Updated package to version 1.2

    Changelog:

    • Added temperature of physical disks
    • Fixed an issue where not all physical disks would be detected
    • Added Perl as package dependency
  • Avatar
    IT-Man

    Updated package to version 1.3

    Changelog:

    • Better detection of Perl dependency
    • Sort list of physical disks to match mount order
    • Added device name of physical disk
  • Avatar
    apfelbuero

    Hi,

    unfortunately I am not able to get this thing working. Are there any known issues with the latest DSM 5.0-4493 Update 3. I can access the SNMP data through another SNMP app (e.g. on my iPhone) but my NAS doesn't show up in P9. IP ranges are configured properly (eg. 192.168.50.0 - 255.255.255.0), community is "public" and the "synology_p9.spk" ist installed as well as the "pearl" package.

     

    Any ideas?

  • Avatar
    IT-Man

    Hi, 

    I have send you an email from support@panorama9.com about your problem.

    Best regards

    Claus

  • Avatar
    nothappy

    Is there a solution to the above problem? If so, then why isn't it posted here?

  • Avatar
    IT-Man

    Hello,

    The problem is a Synology issue when installing 3rd. party applications, the device need to be rebooted, before it registers the P9 app.. You can always test this by running a SNMPwalk against the devices OID "1.3.6.1.2.1.1.1.0" it will contain "synology nas (extend p9)" if the P9 app has been accepted.

    ".1.3.6.1.2.1.1.1.0": Linux DiskStation 2.6.32.12 #1955 Sat Nov 26 14:50:54 CST 2011 armv5tel GNU/Linux synology_88f6281_210j - synology nas (extend p9)

  • Avatar
    IT-Man

    Updated package to version 1.4

    Changelog:

    • Support for DSM 6.x 
    • Support for single bay storage devices, such as DS115j
    Edited by IT-Man
  • Avatar
    apfelbuero

    Hey IT-Man,
    can you please update the download links in the article above. They all lint to V 1.3, only the very last one is V 1.4
    Thanks!

  • Avatar
    IT-Man

    @apfelbuero,
    Thanks for the heads up - links are updated. Sorry for the inconvenience.