MIBs and Plugins for Hard drive health

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: MIBs and Plugins for Hard drive health

Post by lmiltchev »

Are you running nagios on CentOS? What is the output of the following command?

Code: Select all

yum reposlist
Be sure to check out our Knowledgebase for helpful articles and solutions!
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBs and Plugins for Hard drive health

Post by MPIvan »

no im running nagios on ubuntu server 12.04 LTS
and for the command is missing option command ... the output was help for yum ...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBs and Plugins for Hard drive health

Post by abrist »

Try:

Code: Select all

apt-get install libnet-snmp-perl
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBs and Plugins for Hard drive health

Post by MPIvan »

this is the output ...
root@nagios:/usr/local/nagios/etc/objects# apt-get install libnet-snmp-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
libnet-snmp-perl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
it is relay annoying showing this errors :)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBs and Plugins for Hard drive health

Post by abrist »

Well you have the packages, lets check their location so you can add it to your path:

Code: Select all

ls -la /usr/share/perl5/Net/SNMP/*
If those directories are empty, lets find out where it is:

Code: Select all

find / -name SNMP
Once found, add the directory to your path:

Code: Select all

PATH=$PATH:/usr/share/perl5/Net/
export PATH
Now try running the check "check_cpqdisks" from the cli.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBs and Plugins for Hard drive health

Post by MPIvan »

well this is the output from the ls -la /usr/share/perl5/Net/SNMP*

Code: Select all

root@nagios:~# ls -la /usr/share/perl5/Net/SNMP/*
-rw-r--r-- 1 root root 18397 Sep 10  2010 /usr/share/perl5/Net/SNMP/Dispatcher.pm
-rw-r--r-- 1 root root 51840 Sep 10  2010 /usr/share/perl5/Net/SNMP/Message.pm
-rw-r--r-- 1 root root 13514 Sep 10  2010 /usr/share/perl5/Net/SNMP/MessageProcessing.pm
-rw-r--r-- 1 root root 26880 Sep 10  2010 /usr/share/perl5/Net/SNMP/PDU.pm
-rw-r--r-- 1 root root  5651 Sep 10  2010 /usr/share/perl5/Net/SNMP/Security.pm
-rw-r--r-- 1 root root 22787 Sep 10  2010 /usr/share/perl5/Net/SNMP/Transport.pm

/usr/share/perl5/Net/SNMP/Security:
total 68
drwxr-xr-x 2 root root  4096 Feb 21 12:43 .
drwxr-xr-x 4 root root  4096 Feb 21 12:43 ..
-rw-r--r-- 1 root root  4439 Sep 10  2010 Community.pm
-rw-r--r-- 1 root root 52004 Oct 17  2011 USM.pm

/usr/share/perl5/Net/SNMP/Transport:
total 28
drwxr-xr-x 4 root root 4096 Feb 21 12:43 .
drwxr-xr-x 4 root root 4096 Feb 21 12:43 ..
drwxr-xr-x 2 root root 4096 Feb 21 12:43 IPv4
-rw-r--r-- 1 root root 2315 Sep 10  2010 IPv4.pm
drwxr-xr-x 2 root root 4096 Feb 21 12:43 IPv6
-rw-r--r-- 1 root root 4273 Sep 10  2010 IPv6.pm
root@nagios:~#
here is the other output

Code: Select all

root@nagios:~# find / -name SNMP
/usr/share/perl5/Net/SNMP
/usr/local/share/perl/5.14.2/Net/SNMP
/usr/local/lib/perl/5.14.2/auto/Net/SNMP
/root/.cpan/build/Net-SNMP-v6.0.1-ciBWc0/blib/lib/Net/SNMP
/root/.cpan/build/Net-SNMP-v6.0.1-ciBWc0/lib/Net/SNMP
root@nagios:~#


and when you saying to add the directory in my path

Code: Select all

PATH=$PATH:/usr/share/perl5/Net/
export PATH
where exactly this should i add ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBs and Plugins for Hard drive health

Post by abrist »

MPIvan wrote: where exactly this should i add ?
From the cli, as I want to test to see if you are having path problems to the net-snmp files.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBs and Plugins for Hard drive health

Post by MPIvan »

bead english i have but never mind ... here is the output
root@nagios:~# PATH=$PATH:/usr/share/perl5/Net
root@nagios:~# export PATH
root@nagios:~#
... nothing :)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MIBs and Plugins for Hard drive health

Post by abrist »

MPIvan wrote:... nothing

Code: Select all

PATH=$PATH:/usr/share/perl5/Net/
export PATH
echo $PATH
It should get added to your shell $PATH (and does so quietly). Once you run the path commands, try to run the plugin again in the same terminal session as changing $PATH this way is not persistent. I just want to check if you are having path issues.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: MIBs and Plugins for Hard drive health

Post by MPIvan »

here it is....
root@nagios:~# echo $PATH
/root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
root@nagios:~# PATH=$PATH:/usr/share/perl5/Net/
root@nagios:~# export PATH
root@nagios:~# echo $PATH
/root/perl5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/share/perl5/Net/
root@nagios:~#
Locked