Others

check_qnap

Description:

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$”
}

Current Version

1.40

Last Release Date

2018-02-09

Compatible With

  • Nagios 3.x
  • Nagios 4.x

Owner

License

GPL


Project Files
Project Notes
-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) Add a Review
works
by bendikviktor, November 30, 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



Fix for systems that have not all disks installed
by MS-PL, May 31, 2020

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



it does the job :)
by narcan, January 31, 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.



works perfect on ts-469 pro
by Jemenz, August 31, 2014

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! :)



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 (8)
Favorites
2
Views
61,451