Network Connections, Stats and Bandwidth

Check QNAP Disk

Description:

This plugin checks all disk slots on your QNAP NAS host with snmp and will output OK, WARNING or CRITICAL if the resulting number is over the specified thresholds. Enable on your QNAP NAS the snmpd (see the QNAP adminguide too).

Current Version

1.0.4.1

Last Release Date

2018-09-28

Compatible With

  • Nagios 3.x
  • Nagios 4.x

Owner

License

GPL


Project Files
Project Photos
Project Notes
This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY. It may be used, redistributed and/or modified under the terms of the GNU General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt). 'This plugin checks all disk slots on your QNAP NAS host with snmp and will output OK, UNKNOWN, WARNING or CRITICAL if the resulting number is over the specified thresholds. Enable on your QNAP NAS the snmpd (see the QNAP adminguide too). Usage: check_qnapdisk [-h] [-V] -H hostname [-t timeout] [-r retries] [-C community] [-p port] [-w warning] [-c critical] [-T C | F ] [-g temp_warning] [-l temp_critical] [-v verbose] [-d debug] [-M mode] -?, --usage Print usage information -h, --help Print detailed help screen -V, --version Print version information --extra-opts=[section][@file] Read options from an ini file. See https://www.monitoring-plugins.org/doc/extra-opts.html for usage and examples. -w, --warning=INTEGER,[INTEGER] Maximum number of allowable result, outside of which a warning will be generated. If omitted, no warning is generated. -c, --critical=INTEGER,[INTEGER] Maximum number of the generated result, outside of which a critical will be generated. -T, --temperature=STRING, Specify to use Celsius (default) or Fahrenheit. -g, --temp_warning=INTEGER,[INTEGER] Specify the warning maximum degrees. -l, --temp_critical=INTEGER,[INTEGER] Specify the critical maximum degrees. -p, --port=INTEGER, Specify the snmp port on the command line, default 161. -r, --retries=INTEGER, Specify the number of retries the command line, default 2. -C, --community=STRING, Specify the snmp v2 community name, default public. -M, --mode=STRING, reads the values from snmp table from mode, availaible modes are disk, vol[+], cpu[+], fan[+], mem[+], all default: disk. -H, --host=STRING, Specify the host on the command line. -d, --debug , enable debug -t, --timeout=INTEGER Seconds before plugin times out (default: 15) -v, --verbose Show details for command-line debugging (can repeat up to 3 times) THRESHOLDs for -w and -c are specified 'min:max' or 'min:' or ':max' (or 'max'). If specified '@min:max', a warning status will be generated if the count *is* inside the specified range. example : check_qnapdisk -H 'ip-address or [DNS|host]name' -t 5 -r 2 -C public -p 161 -w 2: -c 1: -T C -g 25 -l 35 -v -M disk The plugin has been tested with TS-659 Pro, TS-212, TS-464 and TS-664. The plugin works with QNAP-OS-Versions 5.x, 4.2.x, 4.3.x . ################################################################ # Changelog ################################################################ # Version 1.0.4.5 # 2024.01.25 # changed volumestatus "Checking..." to WARNING ################################################################ # Version 1.0.4.4 # 2023.03.02 # Adaptation to version QTS 5.0.x ################################################################ # Version 1.0.4.3 # 2021.12.14 # rewrite mode switch # as bugfixes ################################################################ # Version 1.0.4.2 # 2020.01.25 # added mode memory # some bugfixes ################################################################ # Version 1.0.4.1 # 2018.09.28 # change from cpu-temp to sys-temp ################################################################ # Version 1.0.4 # 2016.03.19 # works with Monitoring::Plugin and Nagios::Plugin # added warnig if SmartInfoStatus not 'GOOD' # some new environment features ################################################################ # Version 1.0.3 # 2014.09.30 # version skipped ################################################################ # Version 1.0.2 # 2014.06.10 # added smart info to plugin output # thanks to # http://exchange.nagios.org/directory/Reviews/dit_w/1#/ ################################################################ # Version 1.0.1 # 2014.02.19 # change some vars from my to our # thanks to # http://exchange.nagios.org/directory/Reviews/navi/1 ################################################################ # Version 1.0 # 2013.01.19 ################################################################
Reviews (10) Add a Review
helpful plugin
by justLM, April 30, 2020

In some monitoring machines works fine. But in a OMD-LAbs machine (nagios-engine) it doesn't work. Even if I install "perl -MCPAN -e 'install Monitoring::Plugin'" or 'Nagios::Plugin' I receive this error: root@monitoring:~# /omd/sites/mysite/lib/monitoring-plugins/check_qnapdisk -H my host address -w 4: -c 4: -T C -g 40 -l 45 -v -t 60 Can't locate Nagios/Plugin.pm in @INC (you may need to install the Nagios::Plugin module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /omd/sites/mysite/lib/monitoring-plugins/check_qnapdisk line 24. BEGIN failed--compilation aborted at /omd/sites/mysite/lib/monitoring-plugins/check_qnapdisk line 24. Has anyone the same problem? Thank you. G.



Works with a little hack since Nagios Perl plugin changed
by arnotixe, March 31, 2017

on my QNAP TS-853A 8-bay I just went to control panel and enabled SNMP. Heads up: As http://search.cpan.org/dist/Nagios-Plugin/lib/Nagios/Plugin.pm indicates, you need to search-and-replace "Nagios::Plugin" with "Monitoring::Plugin" in the perl script now. You also need to perl -MCPAN -e 'install Monitoring::Plugin' instead of "Nagios::Plugin' :D thanks!



Works with QNAP TS-1279U-RP
by haus, March 31, 2016

Adding the QNAP TS-1279U-RP to the list of compatible devices.



Status is OK when drive has failed
by magixnetworks, February 29, 2016

Get the following error when a drive has failed Argument "--" isn't numeric in numeric lt (2, Disk1:ready, Disk2:ready, max. Temperature:37C ================= Disk 1 Status: ready, SmartInfo: GOOD, Typ: WD20EARS-00MVWB0, Size: 1.82 TB, Temp: 37 C/98 F Disk 2 Status: ready, SmartInfo: --, Typ: ST2000DM001-9YN1, Size: 1.82 TB, Temp: -- C/-- F



How to
by idscomm, December 31, 2015

Hey guys, I am new with Nagios and I finally got it up and running Thank God! lol Now, how do we install these types of plugin? I am interested in installing a few including this one since I have a QNAP 4-bays but I don't know what and how to do this! : ( Thanks a lot!



Works well!
by elia, September 30, 2014

Works well also on TS-869 PRO



Very informative, only one thing to improve!
by dit_w, April 30, 2014

This is the most informative plugin for checking qnap that I have found and also the most flexible (allows to set snmp port for example) Only thing I'm missing is SMART status checking. That's because, as I have found out recently, disk can return status ready when SMART reports fail. The disk is finished but without checking SMART we know of this only when it fails totally and drops out of array. The OID for this is .1.3.6.1.4.1.24681.1.2.11.1.7.x I hope the autor will add that functionality. Thanks!



Great !
by DocAndreas, September 30, 2013

This plugin worked immediately after downloading. All (4) our qnap systems are now monitored. Your work saved me a lot of time. Thanks Jörg !



Great Plugin
by navi, September 30, 2013

To get rid of "(Service check did not exit properly)" you need to change var type from: my $PROGNAME my $VERSION my $np to: our $PROGNAME our $VERSION our $np



Works on the command line, but ...
by ronator, August 31, 2013

This plugin is written in perl and when I executed it on the CLI, it worked like a charm! But when I tried to run (the same query) through nagios, I got an error: (Service check did not exit properly) The problem was with the nagios system account; I had to allow it, to use sudo. After modifying /etc/sudoers and nagios-commands.cfg it did the job. Since there was no hint to do that, I have to substract 1 point for the style marks. Tested with Nagios Core 3.2.0 on an Ubuntu 10.04 with a QNAP TS-809U. Thank you for your achievement.



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.7 (16)
Favorites
5
Views
101,182