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.
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).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)