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

Check QNAP Disk

Rating
15 votes
Favoured:
5
Current Version
1.0.2
Last Release Date
2014-06-10
Compatible With
  • Nagios 3.x
  • Nagios 4.x
Owner
License
GPL
Hits
79646
Files:
FileDescription
check_qnapdisk_1.0.tar.gzplugin check_qnapdisk
check_qnapdisk.1.0.1.tar.gzplugin check_qnapdisk
check_qnapdisk.1.0.2.tar.gzplugin check_qnapdisk
check_qnapdisk_1_0_2.zipcheck_qnapdisk_1_0_2.zip
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Check QNAP Disk
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).
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).

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]

-?, --usage
Print usage information
-h, --help
Print detailed help screen
-V, --version
Print version information
-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 or Fahrenheit on the command line. Use Temp.
-g, --temp_warning=INTEGER,[INTEGER] Specify the warning maximum degrees on the command line. Use Temp.
-l, --temp_critical=INTEGER,[INTEGER] Specify the critical maximum degrees on the command line. Use Temp.
-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 community name on the command line, default public.
-H, --host=STRING, Specify the host on the command line.
-t, --timeout=INTEGER
Seconds before plugin times out (default: 15)
-v, --verbose
Show details

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

The plugin has been tested with TS-659 Pro and TS-212.

##########################################################
# 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
Reviews (9)
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!
Adding the QNAP TS-1279U-RP to the list of compatible devices.
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
byidscomm, December 17, 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!
Owner's reply

Hi idscomm,

a good way is, see about the documentation of nagios, but a short help you see below:

# you have to define a check command like this:
# 'check_qnapdisk' command definition
define command{
command_name check_qnapdisk
command_line „your_path_to_check_script“/check_qnapdisk -H $HOSTADDRESS$ -C -t 8 -v -w $ARG1$ -c $ARG2$ -T $ARG3$ -g $ARG4$ -l $ARG5$
}

# you have to define a service
# service qnapdisk
define service{
use generic-service ; Name of service template to use
host_name TS-459
service_description QNAPDISK
check_command check_qnapdisk!4:!3:!C!:41!:45 ; your check parameters
notifications_enabled 1
normal_check_interval 1 ; Check the service every 5 minutes under normal conditions
}

byelia, September 23, 2014
Works well also on TS-869 PRO
bydit_w, April 1, 2014
1 of 1 people found this review helpful
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!
byDocAndreas, September 23, 2013
1 of 2 people found this review helpful
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 !
bynavi, September 13, 2013
2 of 2 people found this review helpful
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
byronator, August 20, 2013
2 of 2 people found this review helpful
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.