OS - VMware vSphere - Guest Opspack (Deprecated)

Deprecation Notice

This Opspack is deprecated and will be removed in a future release. It may not be present in your installation of Opsview.

VMware is considered as a leading pioneer in virtualization and the company virtualizes everything from computing to the data center, and even extends into cloud and mobile devices. This constant evolution of all things virtual is intended to help users become more agile, responsive and profitable in their day-to-day work and helps them achieve business requirements.

What You Can Monitor Copied

Our Opspack allows you to not only deploy Opsview in VMware with your master and slave virtualized systems, but also monitor all of your VMware virtual machines.

The VMware Opspack can accomplish tasks such as:

Service Checks Copied

Service Check Description
Guest Active Memory Check guest active memory used
Guest CPU Check Check guest CPU used as a percentage
Guest CPU Usage Check CPU used as a percentage
Guest IO Check guest disk IO
Guest Memory allocated Memory allocated to VM in MB
Guest Memory Used Checks memory used on VMware guest
Guest Memory Used Check guest memory used as a percentage
Guest OS Status Check status of Guest OS (Needs VMware tools)
Guest status Status of guest (is it up or down)
Guest Swap In Check guest memory swapped in
Guest Swap Out Check guest memory swapped out
Guest VMware tools status Check status of VMware tools on VM

Prerequisites Copied

Opsview Cloud

For Opsview Cloud customers, please contact ITRS Support for assistance with these steps, as they require Orchestrator access.

The VMware vSphere templates require VMware’s vSphere SDK for Perl. You must install this to allow the monitoring plugins provided with Opsview to query the VMware API.

Opsview has been tested using vSphere SDK version 6.7.0.

You can check your version of vSphere SDK with:

perl -MVMware::VIRuntime -e 'print VMware::VIRuntime->VERSION,$/'

Note: You may need to install the Text::Template and UUID perl modules to run the above command. You can do so by running:

sudo cpan install Text::Template UUID

Note: If you have slaves, you will need to install the SDK on each slave server. This template will work against VMware ESX servers as well.

Installation Copied

Debian and Ubuntu Copied

Download VMware’s vSphere SDK for Perl, for the appropriate bit level. We assume 64 bit.

Transfer to the Opsview master and slaves and extract the file:

tar --gzip -xvf VMware-vSphere-Perl-SDK-6.7.0-8156551.x86_64.tar.gz
cd vmware-vsphere-cli-distrib

Install the required extra packages:

apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 build-essential gcc uuid uuid-dev perl libssl-dev perl-doc liburi-perl libxml-libxml-perl libcrypt-ssleay-perl

Then, as root install:

PERL5LIB=/opt/opsview/perl/lib/perl5 ./vmware-install.pl

Accept the license agreement and install the sdk in the default location.

Test the install with:

perl -MVMware::VIRuntime -e 'print "Installed"'

RHEL and CentOS Copied

You will require the openssl-devel package to use the VMware SDK:

yum install openssl-devel

Download VMware’s vSphere SDK for Perl, for the appropriate bit level. We assume 64-bit.

Transfer to the Opsview master and slaves and extract the file:

tar --gzip -xvf VMware-vSphere-Perl-SDK-6.7.0-8156551.x86_64.tar.gz
cd vmware-vsphere-cli-distrib

Then, as root install:

PERL5LIB=/opt/opsview/perl/lib/perl5 ./vmware-install.pl

Accept the license agreement and install the sdk in the default location.

Test the install with:

perl -MVMware::VIRuntime -e 'print "Installed"'

Post Installation Copied

Once you have installed the VMware SDK we recommend that you re-run the plugin update script on the Opsview master so that the embedded help information is correct. As the opsview user run:

sudo -iu opsview /opt/opsview/coreutils/bin/populate_db.pl plugins

Setup and Configuration Copied

To configure and utilize this Opspack, you simply need to specify the VMware vSphere (guest port via the variable VMWAREGUESTCREDENTIALS, which needs to be added to the host).

Add the host template Copied

Add host template

Add and configure the VMWAREGUESTCREDENTIALS variable Copied

Host Variable Description
VMWAREGUESTCREDENTIALS Used for the VMware guest to connect to its VMware host. The value is not used and therefore can be set to anything. arg1 is the username for authentication with the VMware ESX / Vsphere server, arg2 is the password, arg3 is the VMware host server IP address and arg4 is the VMware name for the VM.
VMWARE_API_ARGUMENTS The value is not used and therefore can be set to anything. arg1 is used for extra arguments that you may want to use for all check_vmware_api calls. The default value is –no-certificate-checking which allows communication to a server that has different certificates. Change the variable’s default value if you want to change this globally. Alternatively, override this variable on a host if you want to override the host specifically.

Set the VMWAREGUESTCREDENTIALS and specify the username, password, VMware hostname and the VMware guest name with the overrides.

Add variables

Apply Changes Copied

Apply Changes and view the VMware vSphere - Guest statistics:

View Service Checks

Troubleshooting Copied

Server version unavailable Copied

If you get the following error:

CHECK_VMWARE_API.PL CRITICAL - Server version unavailable at 'https://vmwareserver.example.com:443/sdk/vimService.wsdl'

Try to visit the above URL directly from your browser. If you get a certificate error in your browser, you will need to update the arguments of the service check to include –no-certificate-checking so that the certificate validating is ignored. For enhanced security, we recommend you fix your certificate so it is a valid certificate.

It is possible to use a specific certificate with the -certificate-file=FILENAME option.

["Opsview On-Premises"] ["Opsview > Opspacks"] ["User Guide", "Technical Reference"]

Was this topic helpful?