Page 2 of 4
Re: Monitor QNAP disk space in Nagios
Posted: Tue Sep 30, 2014 10:50 am
by slansing
What is the output of:
Code: Select all
ll /usr/share/perl5/Net/SNMP.pm
ll /usr/share/perl5/strict.pm
Re: Monitor QNAP disk space in Nagios
Posted: Tue Sep 30, 2014 11:21 am
by imran_khan
Hello,
Thanks for the reply. Please find the output.
[root@localhost Net]# ll /usr/share/perl5/constant.pm
-rw-r--r-- 1 root root 12528 Nov 22 2013 /usr/share/perl5/constant.pm
[root@localhost libexec]# ll /usr/share/perl5/Net/SNMP.pm
ls: cannot access /usr/share/perl5/Net/SNMP.pm: No such file or directory
[root@localhost libexec]# ll /usr/share/perl5/strict.pm
-rw-r--r-- 1 root root 3716 Nov 22 2013 /usr/share/perl5/strict.pm
Net::SNMP is installed in the system.
[root@localhost ~] instmodsh
Available commands are:
l - List all installed modules
m <module> - Select a module
q - Quit the program
cmd? l
Installed modules are:
Net::SNMP
Thanks,
Imran Khan.
Re: Monitor QNAP disk space in Nagios
Posted: Tue Sep 30, 2014 4:21 pm
by sreinhardt
Well it may say its installed, but the files certainly do not appear in normal perl paths. Let's see if we can't find it.
Re: Monitor QNAP disk space in Nagios
Posted: Wed Oct 01, 2014 2:45 pm
by imran_khan
Hello,
Thanks for the reply. Getting below output.
[root@localhost ~]# find / -name SNMP.pm
/root/.cpan/build/Net-SNMP-v6.0.1-Ai1_Te/lib/Net/SNMP.pm
/root/.cpan/build/Net-SNMP-v6.0.1-Ai1_Te/blib/lib/Net/SNMP.pm
/usr/local/share/perl5/Net/SNMP.pm
Thanks,
Imran Khan.
Re: Monitor QNAP disk space in Nagios
Posted: Wed Oct 01, 2014 3:32 pm
by sreinhardt
Looks like you have a version of net-snmp, and it is placed within a valid perl path location. Let's check permissions on it:
Code: Select all
ll -lva /usr/local/share/perl5/Net/SNMP.pm
ll -lva /usr/local/share/perl5/Net -d
ll -lva /usr/local/share/perl5/ -d
Re: Monitor QNAP disk space in Nagios
Posted: Wed Oct 01, 2014 3:50 pm
by imran_khan
Hello,
Please find the output.
[root@localhost ~]# ll -lva /usr/local/share/perl5/Net/SNMP.pm
-r--r--r-- 1 root root 115525 Sep 9 2010 /usr/local/share/perl5/Net/SNMP.pm
[root@localhost ~]# ll -lva /usr/local/share/perl5/Net -d
drwxr-xr-x 4 root root 4096 Jul 20 02:24 /usr/local/share/perl5/Net
[root@localhost ~]# ll -lva /usr/local/share/perl5/ -d
drwxr-xr-x 43 root root 4096 Jul 20 03:10 /usr/local/share/perl5/
Thanks,
Imran Khan.
Re: Monitor QNAP disk space in Nagios
Posted: Wed Oct 01, 2014 3:59 pm
by sreinhardt
Wow 2010, that looks pretty old. Let's take a look at what version you have.
Code: Select all
rpm -qa | grep perl-Net-SNMP
yum list installed | grep perl-Net-SNMP
yum info perl-Net-SNMP
Re: Monitor QNAP disk space in Nagios
Posted: Wed Oct 01, 2014 4:17 pm
by imran_khan
Hello,
Showing perl-Net-SNMP rpm is not installed on the system
[root@localhost ~]# yum list installed | grep perl-Net-SNMP
[root@localhost ~]# yum info perl-Net-SNMP
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.constant.com
* extras: mirror.cs.vt.edu
* updates: mirror.metrocast.net
base | 3.7 kB 00:00
extras | 3.3 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 5.4 MB 00:02
Error: No matching Packages to list
Thanks,
Imran Khan.
Re: Monitor QNAP disk space in Nagios
Posted: Thu Oct 02, 2014 10:39 am
by sreinhardt
I believe you said this was Cent\RHEL 6 before, so you are going to need the rpmforge repository. Try the following:
Code: Select all
cd /tmp
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rm -rf rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum install perl-Net-SNMP -y
Re: Monitor QNAP disk space in Nagios
Posted: Thu Oct 02, 2014 11:32 am
by imran_khan
Hello,
Installed perl-Net-SNMP RPM on the server but still getting same error.
[root@localhost libexec]# rpm -qa | grep perl-Net-SNMP
perl-Net-SNMP-5.2.0-1.2.el6.rf.noarch
[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.
Thanks,
Imran Khan.