Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_qnap3.sh
1.21
2017-01-22
- Nagios 3.x
- Nagios 4.x
- Nagios XI
GPL
22270
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!
Check for NAS QNAP using SNMP and bash script.
Based on two different version of check_qnap:
- version 1.03 from: http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/Others/check_qnap/details
and
- last version from: https://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/Others/check_qnap2/details
Fixed minor errors, introduced more check and did some cleanup of the status information and performance info.
Monitoring of:
- System Information
- HD Status (for all disk into NAS)
- Temperature system
- Temperature disks
- Status RAID volume
- CPU usage
- Memory usage
- Diskspace usage
- Uptime (System and Network)
- Fans (for all fan)
Tested on a Qnap TS-853U-RP
Add to Nagios commands.cfg:
define command{
command_name check_qnap
command_line $USER1$/check_qnap3.sh $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
}
Use for example this check_command into service definition:
check_command check_qnap!$HOSTADDRESS!public!diskused!80!90
Based on two different version of check_qnap:
- version 1.03 from: http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/Others/check_qnap/details
and
- last version from: https://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/Others/check_qnap2/details
Fixed minor errors, introduced more check and did some cleanup of the status information and performance info.
Monitoring of:
- System Information
- HD Status (for all disk into NAS)
- Temperature system
- Temperature disks
- Status RAID volume
- CPU usage
- Memory usage
- Diskspace usage
- Uptime (System and Network)
- Fans (for all fan)
Tested on a Qnap TS-853U-RP
Add to Nagios commands.cfg:
define command{
command_name check_qnap
command_line $USER1$/check_qnap3.sh $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
}
Use for example this check_command into service definition:
check_command check_qnap!$HOSTADDRESS!public!diskused!80!90
Reviews (4)
The plugin work well. But when my NAS is off, all the services have the status "ok", however, the results are empty. Is it normal?
(I am a beginner on Nagios)
Thanks
(I am a beginner on Nagios)
Thanks
bypylgrym, November 1, 2017
It mostly works, and does what we need.
However, I fixed a few things to make it work better.
- The volstatus check, I change -le (less-equal) to -ge (greater-equal)
e.g.
if [ "$VOLPCT" -ge "$strCritical" ]; then
.. Otherwise, it would report as 'critical', that you haven't flooded the drive..
- also in volstat, I change the awk part to this:
awk -F: '{print substr($2,2)}'
otherwise it can't handle spaces in the status text,
which in our case meant it wouldnt show the relevant error text.
but otherwise, a great plugin that is easy to adjust.
However, I fixed a few things to make it work better.
- The volstatus check, I change -le (less-equal) to -ge (greater-equal)
e.g.
if [ "$VOLPCT" -ge "$strCritical" ]; then
.. Otherwise, it would report as 'critical', that you haven't flooded the drive..
- also in volstat, I change the awk part to this:
awk -F: '{print substr($2,2)}'
otherwise it can't handle spaces in the status text,
which in our case meant it wouldnt show the relevant error text.
but otherwise, a great plugin that is easy to adjust.
bychameo, March 3, 2017
Works perfect with our TS-253A, TS-269Pro and TS-EC880U.
The only problem was the volstatus, it take some time to figure out that the values are for the free disk space and not the used disk space
The only problem was the volstatus, it take some time to figure out that the values are for the free disk space and not the used disk space
A very complete plugin but with some problems with big disks..
Volume #1: CRITICAL: Unknown, Total Size (bytes): 3.5, Free: 732.6 (20931%)|FreeSize_Volume-1=20931%;1;2;0;100
CRITICAL: Total:3TB - Used:2TB - Free:0GB = 79%|Used=2857.36;35;71;0;3590.00
Volume #1: CRITICAL: Unknown, Total Size (bytes): 3.5, Free: 732.6 (20931%)|FreeSize_Volume-1=20931%;1;2;0;100
CRITICAL: Total:3TB - Used:2TB - Free:0GB = 79%|Used=2857.36;35;71;0;3590.00
Owner's reply
Thanks for your feedback I check this part of code it's a possible bug.