Hello,
Total space on QNAP is 25.26 TB and free is 3.65 TB, even if I am putting warning 5 and critical 10 it is showing same output.
[root@localhost ~]# /usr/local/nagios/libexec/check_snmp -H QNAP_IP -C abc -o .1.3.6.1.4.1.24681.1.2.17.1.4.1 -w 5 -c 10
SNMP OK - "25.26 TB" |
Total space:-
[root@localhost ~]# /usr/local/nagios/libexec/check_snmp -H QNAP_IP -C abc -o .1.3.6.1.4.1.24681.1.2.17.1.4.1
SNMP OK - "25.26 TB" |
Free space:-
[root@localhost ~]# /usr/local/nagios/libexec/check_snmp -H QNAP_IP -C abc -o .1.3.6.1.4.1.24681.1.2.17.1.5.1
SNMP OK - "3.65 TB" |
Thanks,
Imran Khan.
Monitor QNAP disk space in Nagios
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Monitor QNAP disk space in Nagios
I believe you are getting no performance data AND no warning or critical value, as your OID is responding with the string of "25.26 TB" and not a value of 25.26 with a label of TB. There is a very large difference, as warning or critical will only check numeric responses, instead you would have to use the string warning and critical matching, which will NOT work as you need. Most likely if the qnap check you were using is polling this same oid, it is taking the string and converting it to a number, which check_snmp is not designed to do. Do you have another oid that might have a numeric value to check instead? Otherwise you would likely have to write a script to gather this oid's data, convert it to a number, then do warning and critical value checks, or just try another plugin.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
- Posts: 196
- Joined: Mon May 27, 2013 3:16 pm
Re: Monitor QNAP disk space in Nagios
Hello,
Please help me out to fix the issue of check_qnap_volumes plugin.
Thanks,
Imran Khan.
Please help me out to fix the issue of check_qnap_volumes plugin.
Thanks,
Imran Khan.
Re: Monitor QNAP disk space in Nagios
Can you please provide an answer to sreinhardt's question from his last post?
sreinhardt wrote:Do you have another oid that might have a numeric value to check instead?
Former Nagios employee
-
- Posts: 196
- Joined: Mon May 27, 2013 3:16 pm
Re: Monitor QNAP disk space in Nagios
Hello,
No we dont have.
Thanks,
Imran Khan.
No we dont have.
Thanks,
Imran Khan.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Monitor QNAP disk space in Nagios
If there are no other oid's that provide purely a numeric response, the only option you have is to write a wrapper script or separate plugin to convert the string to a number and do warning\critical metrics from there. This is not something that check_snmp can or will do on its own, as it is very specific about not manipulating data provided to it. If you want, you can certainly inquire with sales@nagios.com for the amount of time and cost it would be for us to build this. Depending on the detail you are looking for it could be a pretty short project. Alternatively, you can continue trying other plugins on exchange, but I seem to recall the qnap section being fairly minimal.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.