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
Error message when trying to install VMWare SDK
-
kumardeuja
- Posts: 7
- Joined: Thu Jun 14, 2018 7:53 am
Re: Error message when trying to install VMWare SDK
Is your Nagios XI server connected to the Internet? Are you using a proxy?
What is the output of the following command?
What is the output of the following command?
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl --help | headBe sure to check out our Knowledgebase for helpful articles and solutions!
-
kumardeuja
- Posts: 7
- Joined: Thu Jun 14, 2018 7:53 am
Re: Error message when trying to install VMWare SDK
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!
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
Is your Nagios XI server connected to the Internet? Are you using a proxy?
Run the following commands and show the output:
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
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
kumardeuja
- Posts: 7
- Joined: Thu Jun 14, 2018 7:53 am
Re: Error message when trying to install VMWare SDK
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
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
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:
Did it work this time?
Code: Select all
/usr/local/nagios/libexec/check_esx3.pl --helpBe sure to check out our Knowledgebase for helpful articles and solutions!
-
kumardeuja
- Posts: 7
- Joined: Thu Jun 14, 2018 7:53 am
Re: Error message when trying to install VMWare SDK
I am now able to run the --help command. What is my next step?
Thanks!
Thanks!
Re: Error message when trying to install VMWare SDK
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!