LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Monitoring VMware withe Nagios (Can't locate Nagios/Plugin/Functions.pm) (https://www.linuxquestions.org/questions/linux-software-2/monitoring-vmware-withe-nagios-cant-locate-nagios-plugin-functions-pm-4175505426/)

wael.elmasry 05-19-2014 04:03 AM

Monitoring VMware withe Nagios (Can't locate Nagios/Plugin/Functions.pm)
 
Hello,
I installed Nagios for monitoring and its basic functionalities are working fine, Nagios installed on redhat 6.4 . I was trying to monitor VMware as well. So, I installed "VMware Perl SDK" and got the monitoring scripts from "OP5".
To test that everything is okand are working fine, I used the below command which should resturn no errors while executing.

/usr/lib/nagios/plugins/check_esx -H ESXIP -u username -p Password -l runtime -s status CHECK_ESX OK - overall status=green

I received the below error message instead

Error
Can't locate Nagios/Plugin/Functions.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_esx line 39.
BEGIN failed--compilation aborted at ./check_esx line 39.


By the way, After I finished installing the "VMware Perl SDK", I can see the below warning after "Successfuly installed"

The following Perl modules were found on the system but may be too old to work
with vSphere CLI:

Compress::Zlib 2.037 or newer
Compress::Raw::Zlib 2.037 or newer
version 0.78 or newer
IO::Compress::Base 2.037 or newer
IO::Compress::Zlib::Constants 2.037 or newer
LWP::Protocol::https 5.805 or newer


Perl script for VMware monitoring
http://git.op5.org/git/?p=nagios/op5....git;a=summary

Using nagios to monitor VMware
http://feub.net/2010/12/monitoring-v...e-with-nagios/

regards,

dijetlo 05-28-2014 08:05 PM

Quote:

Can't locate Nagios/Plugin/Functions.pm
Is it installed?
If so, where on your machine is it?
Quote:

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 .)
That's the path the machines was searching for it on. It's probably somewhere else.

GaWdLy 05-28-2014 08:34 PM

Error message says it all...

dijetlo 05-28-2014 08:50 PM

I'm just sorry we didn't get to this guy sooner, he's been sitting since the 19th.

GaWdLy 05-28-2014 09:02 PM

Ah. Oy.

I only noticed because you pinged it up on LQ Spy...

dijetlo 05-28-2014 09:08 PM

Do you haunt the 0 response list?
The questions tend to be more challenging.

wael.elmasry 06-02-2014 04:45 AM

Quote:

Originally Posted by dijetlo (Post 5178382)
Is it installed?
If so, where on your machine is it?

That's the path the machines was searching for it on. It's probably somewhere else.

First , Sorry I didnt reply earlier. I dont know what should I install exactly, Functions.PM is located under the following paths
/usr/share/perl5/File/Spec/Functions.pm
/usr/share/perl5/Pod/Functions.pm

wael.elmasry 06-02-2014 05:01 AM

Quote:

Originally Posted by GaWdLy (Post 5178393)
Error message says it all...

First, sorry I didnt reply earlier and thanks for your help


Functions.PM exists on the below paths only

/usr/share/perl5/File/Spec/Functions.pm
/usr/share/perl5/Pod/Functions.pm

I tried to move the Functions.PM from /usr/share/perl5/Pod/Functions.pm to /usr/share/perl5/ as indicated by the error message with no luck , same error message appears while invoking the command. Also, I modified the permissions of the Functions.PM in the new location to 777 just in case its a permissions issue

dijetlo 06-02-2014 06:01 AM

Quote:

Sorry I didnt reply earlier
.
No worries, Wael, that's the beauty of a message board.

Quote:

Nagios/Plugin/Functions.pm
is a Nagios Plugin, the one further down /user/local/perl5 doesn't appear to be Nagios related.
Do a search on your system for Nagios,
#find / | grep -i nagios/plugin
If you don't get a result, you didn't install it.

GaWdLy 06-02-2014 11:18 AM

dijetlo is on the right path.

When you install Nagios, there are several Nagios packages required. Nagios installs the binaries and the server, but there is a tools or plugins package that is required. It will install the rest of what's needed.

There is always a possibility that the special check that you downloaded from the marketplace is also somewhat broken or incompatible with your version of Nagios, as well. After poking around on the web, the latter is my guess:

http://exchange.nagios.org/directory...M-host/details

Look at the comments at the bottom. Apparently this plugin requires loads of tweaking to work. Also, I notice that the example is used with ESX3...I guess I don't have to ttell you that from ESX3 to ESXi4 or 5 is a huge change and the plguin might not work.

For what it's worth, I was never able to find a decent Nagios plugin for VMWare, and so relied upon VMWare's monitoring solution, instead.


All times are GMT -5. The time now is 02:31 AM.