Page 3 of 4

Re: Monitor QNAP disk space in Nagios

Posted: Thu Oct 02, 2014 4:51 pm
by lmiltchev
Can you run the following commands and show us the output?

Code: Select all

yum list installed | grep -i perl-net-snmp
yum provides perl-Net-SNMP
yum repolist -v

Re: Monitor QNAP disk space in Nagios

Posted: Thu Oct 09, 2014 1:21 pm
by imran_khan
Hello,

Pleaser find the output of requested command.

[root@localhost ~]# yum list installed | grep -i perl-net-snmp
perl-Net-SNMP.noarch 5.2.0-1.2.el6.rf @rpmforge
[root@localhost ~]# yum provides perl-Net-SNMP
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.einstein.yu.edu
* extras: centos.chi.host-engine.com
* rpmforge: repoforge.mirror.constant.com
* updates: centos.aol.com
base | 3.7 kB 00:00
extras | 3.3 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 5.4 MB 00:00
perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch : Net-SNMP Perl module
Repo : rpmforge
Matched from:



perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch : Net-SNMP Perl module
Repo : installed
Matched from:
Other : Provides-match: perl-Net-SNMP



[root@localhost ~]# yum repolist -v
Loading "fastestmirror" plugin
Config time: 0.014
Yum Version: 3.2.29
Loading mirror speeds from cached hostfile
* base: mirrors.einstein.yu.edu
* extras: centos.chi.host-engine.com
* rpmforge: repoforge.mirror.constant.com
* updates: centos.aol.com
Setting up Package Sacks
pkgsack time: 0.054
Repo-id : base
Repo-name : CentOS-6 - Base
Repo-revision: 1385589949
Repo-updated : Wed Nov 27 17:08:25 2013
Repo-pkgs : 6,367
Repo-size : 5.1 G
Repo-mirrors : http://mirrorlist.centos.org/?release=6 ... 64&repo=os
Repo-baseurl : http://mirrors.einstein.yu.edu/centos/6.5/os/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Thu Oct 9 14:19:53 2014)

Repo-id : extras
Repo-name : CentOS-6 - Extras
Repo-revision: 1409693677
Repo-updated : Tue Sep 2 17:34:38 2014
Repo-pkgs : 15
Repo-size : 9.1 M
Repo-mirrors : http://mirrorlist.centos.org/?release=6 ... epo=extras
Repo-baseurl : http://centos.chi.host-engine.com/6.5/extras/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Thu Oct 9 14:19:54 2014)

Repo-id : rpmforge
Repo-name : RHEL 6 - RPMforge.net - dag
Repo-updated : Thu Jul 10 21:46:59 2014
Repo-pkgs : 4,718
Repo-size : 2.2 G
Repo-baseurl : http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/
Repo-mirrors : http://mirrorlist.repoforge.org/el6/mirrors-rpmforge
Repo-expire : 21,600 second(s) (last: Thu Oct 9 14:19:54 2014)

Repo-id : updates
Repo-name : CentOS-6 - Updates
Repo-revision: 1412687300
Repo-updated : Tue Oct 7 09:12:02 2014
Repo-pkgs : 1,600
Repo-size : 4.4 G
Repo-mirrors : http://mirrorlist.centos.org/?release=6 ... po=updates
Repo-baseurl : http://centos.aol.com/6.5/updates/x86_64/ (9 more)
Repo-expire : 21,600 second(s) (last: Thu Oct 9 14:19:55 2014)

repolist: 12,700

Thanks,
Imrna Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Fri Oct 10, 2014 4:33 pm
by sreinhardt
I'm sorry, you do not want the rpmforge version, but the epel version. I misread the package name previously. Try the following:

Code: Select all

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm

yum remove perl-Net-SNMP
yum update
yum install perl-Net-SNMP-5.2.0-4.el6

Re: Monitor QNAP disk space in Nagios

Posted: Mon Oct 13, 2014 8:00 pm
by imran_khan
Hello,

Followed the mentioned steps but getting same error.

[root@localhost libexec]# rpm -qa | grep perl-Net-SNMP
perl-Net-SNMP-5.2.0-4.el6.noarc

[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.

Is there any luck?

I am trying to set warning and critical value but it is not happening. I am getting same output with and without warning and critical value. Please help me out on this.

[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 80: -c 85:
SNMP OK - "25.26 TB" |

[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" |

Thanks,
Imran Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Tue Oct 14, 2014 4:37 pm
by imran_khan
Hello,

Any luck? I am stuck now.

Thanks,
Imran Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Tue Oct 14, 2014 8:21 pm
by imran_khan
Hello,

I have removed "use SNMP 6.0.1" and added "use Net::SNMP 6.0.1;" in plugin and now I am able to view the help but plugin is still not working. Please suggest me on the same.

root@localhost libexec]# ./check_qnap_volumes -H QNAP_Server_IP -w 80% -c 90% -t 10
Can't locate object method "new" via package "SNMP::Session" (perhaps you forgot to load "SNMP::Session"?) at ./check_qnap_volumes line 117.

Thanks,
Imran Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Wed Oct 15, 2014 5:17 pm
by imran_khan
Hello,

Any help?

Thanks,
Imran Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Thu Oct 16, 2014 9:49 am
by slansing
imran_khan,

As has been mentioned to you in the past, when you bump your posts with new ones, it puts you lower on our list as your last reply time is what we look at. Continuously asking for updates does nothing to get them faster.



Now that you hopefully understand that, have you actually tried specifying a valid warning and critical flag set? The one you showed us is not going to work, you had no space between "-c" and ":85"..... Try a more basic value first:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.168.210 -C hidden -o .1.3.6.1.4.1.24681.1.2.17.1.4.1 -w 80 -c 85

Re: Monitor QNAP disk space in Nagios

Posted: Thu Oct 16, 2014 10:01 am
by imran_khan
Hello,

Corrected the command in previous post. Also I am trying the below mentioned command and getting 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 80 -c 85
SNMP OK - "25.26 TB" |

[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" |

Thanks,
Imran Khan.

Re: Monitor QNAP disk space in Nagios

Posted: Thu Oct 16, 2014 11:08 am
by lmiltchev
Can you try using a warning or a critical value that would produce a "non-ok state" output? In both examples, you have "OK" state.