Solved

Error Installing plugin on Nagios

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mobaxterm not able to change directory 28 111
nagios remote hosts 9 46
CentOS 7 Installation 7 60
How code a 301 redirect for folder files -> 1 file 2 22
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

863 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

18 Experts available now in Live!

Get 1:1 Help Now