0

I'm trying to use the script check_vmware_api to get informations of my esxi but I get the following error:

[root@centreon plugins]# ./check_vmware_api.pl 
Can't locate Monitoring/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_vmware_api.pl line 39.
BEGIN failed--compilation aborted at ./check_vmware_api.pl line 39.
0

How did you install these dependencies, through CPAN or yum ? With all the errors you have, I assume you did it through CPAN.

In the same situation, I would remove everything you've installed with CPAN and install everything again through yum. CPAN is really useful but can be tricky sometimes.

For this plugin to work, you need two things :

  • The VMware SDK (I suppose you've installed this first, no need to deinstall/reinstall it)

  • libnagios (install it with yum, it will put all the necessary dependencies)

1
  • yer i did it through cpan :/ – user396019 Jan 19 '17 at 15:23
0

The error message is clear. It means you are missing a Perl module. You can install it from CPAN or from the package manager of your Linux distribution if available (like yum for CentOS, apt for Debian/Ubuntu).

2
  • Thank you for you answer but I've installed all the modules. [root@centreon plugins]# find / -name "Functions.pm" /usr/lib/nagios/plugins/Functions.pm – user396019 Jan 19 '17 at 13:59
  • Now I get the error Undefined subroutine &Nagios::Plugin::plugin_exit called at ./check_vmware_api.pl line 825 – user396019 Jan 19 '17 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.