OS - VMware vSphere - Host 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:
- Monitoring your host systems: Includes Host Health, CPU, DataStore, Memory Usage, Interface Status and more
- Monitoring your guests systems: Includes Active Memory, CPU, Guest Memory, OS Status, SWAP, and VMware tool status
Service Checks Copied
Service Check | Description |
---|---|
Datastore Free Space | Check available free space on vSphere Datastore |
Host CPU Usage | Check CPU usage of VMware host |
Host CPU Usage Mhz | Check CPU usage of VMware host |
Host Health | Check health of VMware host |
Host Interface Status | Check network interface status of VMware host |
Host Memory Usage | Check memory usage of VMware host |
Host Overall Health | Check overall health of VMware host |
Host Temperature Check | Check temperature of VMware host |
VM Status | Check status of virtual machines |
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 - Host port via the variable VMWAREDATASTORE and VMWAREHOSTCREDENTIALS which needs to be added to the host.
Add the host template Copied
Add and configure the VMWAREDATASTORE and VMWAREHOSTCREDENTIALS variables Copied
Host Variable | Description |
---|---|
VMWAREHOSTCREDENTIALS | Used for the VMware host credentials. 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. |
VMWAREDATASTORE | The value is not used and therefore can be set to anything. arg1 should be the name of the data store in VMware. You can have multiple host variables to check each data store in the VMware host. arg2 can be the threshold settings that you want to use instead of the default values. |
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 VMWAREDATASTORE name and the warning/critical overrides if the system requires different warning levels.
Set the VMWAREHOSTCREDENTIALS and specify the username and password with the overrides.
Step 3: Apply Changes and view the VMware vSphere - Host statistics
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.