Page 1 of 1

Error message when trying to install VMWare SDK

Posted: Wed Dec 26, 2018 12:12 pm
by kumardeuja
I recently installed Nagios and trying to configure VMWare plugins, but when trying to follow steps from the PDF located at (https://assets.nagios.com/downloads/nag ... 1544533180), I am receiving the following error below:

Creating a new vSphere CLI installer database using the tar4 format.

Installing vSphere CLI 6.7.0 build-8156551 for Linux.

Network is unavailable, please configure the network first otherwise please
install the following modules manually for use by vSphere CLI:

Time::Piece 1.31 or newer
Archive::Zip 1.28 or newer
Path::Class 0.33 or newer
Try::Tiny 0.28 or newer
UUID 0.27 or newer
Text::Template 1.47 or newer
Net::INET6Glue 0.603 or newer

Any help would be greatly appreciated.

Thanks,
Kumar

Re: Error message when trying to install VMWare SDK

Posted: Wed Dec 26, 2018 12:45 pm
by lmiltchev
Is your Nagios XI server connected to the Internet? Are you using a proxy?

What is the output of the following command?

Code: Select all

/usr/local/nagios/libexec/check_esx3.pl --help | head

Re: Error message when trying to install VMWare SDK

Posted: Thu Dec 27, 2018 11:43 am
by kumardeuja
Here is the output of the command:

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 /usr/local/nagios/libexec/check_esx3.pl line 40.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3.pl line 40.

Thanks!

Re: Error message when trying to install VMWare SDK

Posted: Thu Dec 27, 2018 12:26 pm
by lmiltchev
Is your Nagios XI server connected to the Internet? Are you using a proxy?

Run the following commands and show the output:

Code: Select all

grep 'Nagios::' /usr/local/nagios/libexec/check_esx3.pl
cpan -a | grep -i nagios

Re: Error message when trying to install VMWare SDK

Posted: Fri Dec 28, 2018 8:07 am
by kumardeuja
Nagios server has direct connection to the internet. The output from the command are below:

1. grep 'Nagios::' /usr/local/nagios/libexec/check_esx3.pl
use Nagios::Plugin::Functions qw(%STATUS_TEXT);
use Nagios::Plugin;
my $np = Nagios::Plugin->new(
} or Nagios::Plugin::Functions::nagios_exit(UNKNOWN, "Missing perl module VMware::VIRuntime. Download and install \'VMware vSphere SDK for Perl\', available at https://my.vmware.com/group/vmware/downloads\n $perl_module_instructions"); #This is, potentially, a lie. This might just as well fail if a dependency of VMware::VIRuntime is missing (i.e VIRuntime itself requires something which in turn fails).
$res = Nagios::Plugin::Functions::max_state($res, $state);
$res = Nagios::Plugin::Functions::max_state_alt($res, $state);
$res = Nagios::Plugin::Functions::max_state_alt($res, $state);
$res = Nagios::Plugin::Functions::max_state_alt($res, $state);
$res = Nagios::Plugin::Functions::max_state_alt($res, $state);
$res = Nagios::Plugin::Functions::max_state($res, $state);
$res = Nagios::Plugin::Functions::max_state($res, $state);
$state = Nagios::Plugin::Functions::max_state($state, $status);
$state = Nagios::Plugin::Functions::max_state($state, $status);
$state = Nagios::Plugin::Functions::max_state($state, $status);
$res = Nagios::Plugin::Functions::max_state($res, $status) if (($res != UNKNOWN) || ($status != OK));
$res = Nagios::Plugin::Functions::max_state($res, WARNING);
2. cpan -a | grep -i nagios
cpan -a | grep -i nagios
Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp27155'. Giving up on it. at /usr/share/perl5/CPAN/Index.pm line 225
Nagios::Monitoring::Plugin 0.51 0.51 NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
Nagios::Monitoring::Plugin::Config undef undef NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
Nagios::Monitoring::Plugin::ExitResult undef undef NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
Nagios::Monitoring::Plugin::Functions 0.51 0.51 NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
Nagios::Monitoring::Plugin::Getopt undef undef NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
Nagios::Monitoring::Plugin::Performance undef undef NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
Nagios::Monitoring::Plugin::Range undef undef NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
Nagios::Monitoring::Plugin::Threshold undef undef NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz

Thanks,
Kumar

Re: Error message when trying to install VMWare SDK

Posted: Fri Dec 28, 2018 9:44 am
by lmiltchev
Open the /usr/local/nagios/libexec/check_esx3.pl plugin in a text editor, and change all occurrences of "Nagios::Plugin" to "Nagios::Monitoring::Plugin". Save, exit, and try viewing the help menu again:

Code: Select all

/usr/local/nagios/libexec/check_esx3.pl --help
Did it work this time?

Re: Error message when trying to install VMWare SDK

Posted: Mon Dec 31, 2018 10:42 am
by kumardeuja
I am now able to run the --help command. What is my next step?

Thanks!

Re: Error message when trying to install VMWare SDK

Posted: Wed Jan 02, 2019 9:47 am
by lmiltchev
You can run the VMware wizard against the servers that you would like to monitor. The wizard will create all of the default services for you. Let us know if you run into some issues. Thank you!