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

Directory Tree

check_qnap

Rating
8 votes
Favoured:
2
Current Version
1.40
Last Release Date
2018-02-09
Compatible With
  • Nagios 3.x
  • Nagios 4.x
License
GPL
Hits
61478
Files:
FileDescription
check_qnapbash shell schript
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
This plugin sends SNMP queries to a QNAP NAS and checks the cpu, HDD status, system temperature, HDD temperature.

Version 1.00 first Version.
Version 1.03
Version 1.40
Changes
reports Performance Data
runs faster
some new checks (LUN, Power, ...)
works also with icinga and icinga2

for nagios you need to upload the file into
/usr/local/nagios/libexec/
make it executible
sudo chmod +x /usr/local/nagios/libexec/check_qnap.sh

for icinga2 you need to upload the file
/usr/lib64/nagios/plugins/
make it executible
sudo chmod +x /usr/lib64/nagios/plugins/check_qnap.sh


Nagios commands.cfg

define command{
command_name check_qnap
command_line $USER1$/check_qnap.sh -H $HOSTADDRESS$ -a $ARG1$ -w $ARG2$ -c $ARG3$
}
-----
Service
define service{
use generic-service,nagiosgraph
host_name QNAP-01.local
service_description Diskusage
check_command check_qnap!diskusage!90!95
}
----
for icinga2

object CheckCommand "qnap" {
import "plugin-check-command"
command = [ PluginDir + "/check_qnap" ]
arguments += {
"-C" = "$community_string$"
"-H" = {
required = true
value = "$address$"
}
"-a" = {
required = true
value = "$check_command$"
}
"-b" = "$version$"
"-c" = "$critical$"
"-p" = "$port$"
"-t" = "$timeout$"
"-u" = "$unit$"
"-v" = "$snmpversion$"
"-w" = "$warning$"
}
vars.address = "$address$"
}
-b Check_qnap Version
-C community default public
-t timeout default 10 secdons
-v snmpversion default 2c
-p snmpport defauilt 161
-a checks you can use
cpuload: check´s the system CPU load in perent
cputemp: check´s the sytem CPU Temperature
systemp: check´s the system Temperature
hdtemp: check´s the Harddive Temperature
diskusage: check´s the diskusage on perent
mem: check´s the mem usage in perent
volstatus: check´s the Volume status
fan: check´s the Fan Speed
hdstatus: check´s the Harddive status
cachediskstatus: check´s the Cachedisk status
lunstatus: check´s the LUN status
raidstatus: check´s the Raid status
powerstatus: check´s the Power status
sysinfo: provides the QNAP infos


example

check_qanp -H 192.168.0.2 -a mem

responce: OK: Memory Total=15976MB used=9177MB free:6799MB|Memory usage=43%;80;90;0;100

or

check_qanp -H myqnap.domain.com -C public -v 1 -p 123 -a cputemp -u F -w 40 -c 45 -t 60
checked host myqnap.domain.com
community public
snmpversion 1
snmpport 123
check cpu Temperature
unit fahrenheit
warning 40 F
critical 45 F
timeout 60 seconds
Reviews (4)
bybendikviktor, November 18, 2021
Hi! It is working but I found a problem:
I got this result from the plugin:
Status Information: OK: Online Disk 6, HD status = GOOD, Free Slot 0
As I can see on the Qnap's web page: one disk has Disk Read/Write Error Status, but Good SMART information. It sais : It is recommended to replace the disk...
Can the plugin show not only the SAMRT information but Status too?
Thank you very much
First of all thanks for this great plugin.
We use a QNAP TS-873U-RP with currently 5 disks installed. The plugin throws errors with the hdtemp check because it receives as value for the empty hdd slots "--" which causes a syntax error.
To fix this, I patched the code so that the "empty" values are replaced with 0 and counted. After the SNMP requests the counted "empty" values are subtracted of the total amount of hdd slots to keep the result genuine. The complete "HD Temperature" code block can be found under https://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/Others/check_qnap/review
bynarcan, January 18, 2017
Thank you for this plugin. It does the job :)
Information: You need to set a warning and critical values for volstatus and hdxstatus. I set to 0 both.
It could be improved to doesn't need to set these values.
byJemenz, August 21, 2014
1 of 1 people found this review helpful
The check runs perfect on our opsview installation. We started with one HDD only and the check for the second hdd was reporting "OK: GOOD".

There's a small typo in your check, the SNMP OID in line 246 needs to end with .2 to check the second HDD.

Otherwise, very good check, dear sir! :)