Solved

Error Installing plugin on Nagios

Posted on 2012-03-21
4
1,826 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 35

Accepted Solution

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

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
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…
Suggested Courses

623 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