Closed colinengland closed 5 years ago
Hi Colin,
you haven't read the Readme carefully:
"Adjust the path for the modules directory (use lib "modules") to fit your system (for example: use lib "/usr/local/libexec/myplugins/modules")" Should be around line 87. To find all of the modules the plugin must know where to search. In my installation I have a directory /usr/lib/nagios/vmware (for the plugin, some helper scripts etc.) and within this directory / have the modules subdirectory. So I have:
use lib "/usr/lib/nagios/vmware/modules" Best regards Martin
I had the same problem. This is kind of silly having to modify files, it makes updates difficult. Something like this is a bit awkward due to the check for symlinks, but it works for us:
use Cwd;
# Own modules
if ( -l __FILE__ )
{
use lib dirname(Cwd::abs_path(readlink(__FILE__))) . "/modules";
}
else
{
use lib dirname(__FILE__) . "/modules";
}
Good idea. I will implement it in the next release.
Here I am 3 years later doing a re-install on a new machine. Same problem as before...
Should be same as before. You have to adapt the modules path in check_vmware_esx.pl. That should work.
To make it easier I will put all defaults in a config file with next release. I haveN#t implmented your patch because there are folks outside placing the modules in a complete different directory.
Regards Martin
Give me a short notice if it works or if the problem still remains. Martin
Since the people placing the modules in a completely different directory are already having to edit the file, my fix just makes it easier for the rest of us. I think that looking in the same directory as the script for a modules
directory should be the default behaviour if nothing is specified in a config file. I'll check out your changes once they're committed.
Ok - this issue was aopen as a reminder for me. But currently I'm working on moving all defaults etc to a config file to make it obsolete to adapt the code.
Hey,
Wonder if you can help, have been having issues with the plugin. I have installed all the pre-requesites as far as I can tell but cannot seem to get the plugin to run. The message I am getting is about a missing help.pm? But when looking on the web/cpan I cannot seem to find a help.pm module?
The error message is as follows:
./check_vmware_esx.pl
Possible precedence issue with control flow operator at /usr/local/lib/perl5/5.20.0/VMware/VICommon.pm line 2147. Can't locate help.pm in @INC (you may need to install the help module) (@INC contains: modules /usr/local/lib/perl5/site_perl/5.20.0/x86_64-linux /usr/local/lib/perl5/site_perl/5.20.0 /usr/local/lib/perl5/5.20.0/x86_64-linux /usr/local/lib/perl5/5.20.0 .) at ./check_vmware_esx.pl line 1171. BEGIN failed--compilation aborted at ./check_vmware_esx.pl line 1171.
Many Thanks
Colin England