Solved

Error Installing plugin on Nagios

Posted on 2012-03-21
4
1,754 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now