Page 1 of 4

Monitor QNAP disk space in Nagios

Posted: Thu Sep 18, 2014 10:50 am
by imran_khan
Hello,

I have gone through below link to monitor QNAP disk space in Nagios.

http://exchange.nagios.org/directory/Pl ... mp/details

I want to know that, how to find out “Index for OID (dskPercent)”?

Thanks,
Imran Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Thu Sep 18, 2014 12:01 pm
by slansing
Have you tried just specifying an int there? Like the example shows you? Such as:

Code: Select all

-i 1

Re: Monitor QNAP disk space in Nagios

Posted: Thu Sep 18, 2014 12:09 pm
by imran_khan
Hello,

Tried 1,2,3 etc and getting same error.

[root@localhost libexec]# ./check_disk.sh -H qnap_ip -C community_name -i 1 -w 0:90 -c 0:95 -l "/dev/md0"
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::dskUsed.1

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::dskTotal.1

(standard_in) 2: syntax error
./check_disk.sh: line 50: [: -lt: unary operator expected
(standard_in) 1: syntax error
./check_disk.sh: line 50: [: -lt: unary operator expected
(standard_in) 1: syntax error
./check_disk.sh: line 50: [: -lt: unary operator expected
(standard_in) 1: syntax error
DISK UNKNOWN - External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::dskPercent.1

Thanks,
Imran Khan

Re: Monitor QNAP disk space in Nagios

Posted: Thu Sep 18, 2014 4:49 pm
by slansing
You may want to take a look at trying something similar to this:

http://www.linuxforums.org/forum/gentoo ... -snmp.html

You could also run a check_snmp against that OID, on the remote system and get the int's returned, If you're still having issues with that plugin I'd recommend trying to contact the plugin developer who's information is in the plugin script.

Re: Monitor QNAP disk space in Nagios

Posted: Thu Sep 18, 2014 4:54 pm
by sreinhardt
Considering it is looking for an snmp oid offset, let's do an snmpwalk and see what you have available.

Code: Select all

snmpwalk -v 2c -c community_name qnap_ip UCD-SNMP-MIB::dskTotal

Re: Monitor QNAP disk space in Nagios

Posted: Thu Sep 18, 2014 6:09 pm
by imran_khan
Hello,

Ran the mentioned command, getting below error.

[root@localhost libexec]# snmpwalk -v 2c -c community qnap_ip UCD-SNMP-MIB::dskTotal
UCD-SNMP-MIB::dskTotal = No Such Object available on this agent at this OID


Thanks,
Imran Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Fri Sep 19, 2014 1:04 pm
by sreinhardt
Looks like your device does not support this oid. You could either remove this section of the code from the plugin, if you do not need it, such as if the output you referenced earlier was all you were looking for, or you could find a different plugin that does not use that particular oid and not have to modify the plugin.

Re: Monitor QNAP disk space in Nagios

Posted: Thu Sep 25, 2014 10:17 am
by imran_khan
Hello,

Thanks for the reply.

Is there any best plugin to monitor QNAP space in nagios? I tried 2-3 plugins and did not work.

Thanks,
Imran Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Thu Sep 25, 2014 4:00 pm
by sreinhardt
We do not have a suggested plugin, this is not a device we see too often. What have you tried for plugins, and what responses did the give? Have you checked with qnap about specific oids you might monitor for best results?

Re: Monitor QNAP disk space in Nagios

Posted: Tue Sep 30, 2014 9:51 am
by imran_khan
Hello,

I am trying check_qnap_volumes but getting below error.

http://exchange.nagios.org/directory/Pl ... us/details

[root@localhost libexec]# ./check_qnap_volumes --help
Can't locate SNMP.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./check_qnap_volumes line 29.
BEGIN failed--compilation aborted at ./check_qnap_volumes line 29.

SNMP perl mouldue is already installed in the system. Please suggest me on the same.

Hello,

Trying to install perl-Net-SNMP RPM but this is not available.

[root@localhost ~]# yum install perl-Net-SNMP
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.solarvps.com
* extras: centos.mirror.nac.net
* updates: mirror.metrocast.net
Setting up Install Process
No package perl-Net-SNMP available.
Error: Nothing to do

Thanks,
Imran Khan.