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

Rating
5 votes
Favoured:
1
Current Version
1.40
Last Release Date
2018-02-09
Compatible With
  • Nagios 3.x
  • Nagios 4.x
License
GPL
Hits
46547
Files:
FileDescription
check_qnap2.shcheck_qnap2.sh
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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 (2)
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! :)