Solved

Error Installing plugin on Nagios

Posted on 2012-03-21
4
1,797 Views
Last Modified: 2012-03-29
I run at nagios server at work and i want to install a plugin to monitor my vmware environment.  I'm just running the free version of ESXi so i don't have any builtin fancy tools.

I found this plugin and it seems promising.

i installed the plugin according to the info online and everything appears to work correctly if i just run the script without any arguments.
[nagios@Opsview libexec]$ ./check_vmware_esxi.pl
Usage: check_vmware_esxi.pl -D <data_center> | -H <host_name> [ -N <vm_name> ]
    -u <user> -p <pass> | -f <authfile>
    -l <command> [ -s <subcommand> ]
    [ -x <black_list> ] [ -o <additional_options> ]
    [ -t <timeout> ] [ -w <warn_range> ] [ -c <crit_range> ]
    [ -V ] [ -h ]

Missing argument: command
[nagios@Opsview libexec]$ 

Open in new window

But when i add the arguments i always get this error no matter what type of argument i try or even switching between ESXi 4.1 and 5.0.  I'm changed the username/password in this example.
[nagios@Opsview libexec]$ ./check_vmware_esxi.pl -H 10.1.1.199 -u user -p password -l cpu
Undefined subroutine &Util::disconnect called at ./check_vmware_esxi.pl line 557.
[nagios@Opsview libexec]$ 

Open in new window

[nagios@Opsview libexec]$ ./check_vmware_esxi.pl -H 10.1.1.199 -u user -p password -l service
Undefined subroutine &Util::disconnect called at ./check_vmware_esxi.pl line 557.
[nagios@Opsview libexec]$ 

Open in new window

The Util::disconnect makes me think that it's something to do with Perl but i'm not sure where to go from here.
0
Comment
Question by:c3very
  • 3
4 Comments
 
LVL 2

Author Comment

by:c3very
ID: 37747489
I just found out my issue.  I ran the check as the root user instead of nagios and it provided more error info.  Looks like i'm missing some VMware SDK files.  Getting those installed now.
0
 
LVL 2

Author Comment

by:c3very
ID: 37747517
ok, i downloaded the VMware vSphere SDK for perl and went to install it.  I ran the vmware-install.pl and accepted the EULA.  It then throws this error.
http_proxy not set. please set environment variable 'http_proxy' e.g. export 
http_proxy=http://myproxy.mydomain.com:0000 . 

ftp_proxy not set. please set environment variable 'ftp_proxy' e.g. export 
ftp_proxy=http://myproxy.mydomain.com:0000 . 

[root@Opsview vmware-vsphere-cli-distrib]# 

Open in new window

0
 
LVL 2

Author Comment

by:c3very
ID: 37747560
ok, i used the'export http_proxy=' and 'export ftp_proxy=' before i ran the script and i get farther but now get this error.
Please wait while configuring CPAN ...

Please wait while configuring perl modules using CPAN ...

CPAN is downloading and installing pre-requisite Perl module "Crypt::SSLeay" .

Crypt::SSLeay Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "UUID" .

UUID Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "Data::Dump" .

Data::Dump Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "SOAP::Lite" .

SOAP::Lite Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "XML::SAX" .

XML::SAX Install Command failed .

CPAN is downloading and installing pre-requisite Perl module 
"XML::NamespaceSupport" .

XML::NamespaceSupport Install Command failed .

CPAN is downloading and installing pre-requisite Perl module 
"XML::LibXML::Common" .

XML::LibXML::Common Install Command failed .

CPAN is downloading and installing pre-requisite Perl module "XML::LibXML" .

XML::LibXML Install Command failed .

CPAN not able to install following Perl modules on the system. These must be 
installed manually for use by vSphere CLI:

Crypt::SSLeay 0.55 or newer 
UUID 0.03 or newer 
Data::Dump 1.15 or newer 
SOAP::Lite 0.710.08 or newer 
XML::SAX 0.16 or newer 
XML::NamespaceSupport 1.09 or newer 
XML::LibXML::Common 0.13 or newer 
XML::LibXML 1.63 or newer 
VMware::VIRuntime 0.9 or newer 
WSMan::StubOps 0.1 or newer 
[root@Opsview vmware-vsphere-cli-distrib]# 

Open in new window

0
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 37751634
You have to fetch them from CPAN and install manually
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
perl getopt long help 34 72
How to install Ubuntu 16 in DELL venue 8 pro 20 307
android secure ftp 3 52
Linux Desktop suggestion for Dell Inspiron 3043 13 55
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question