You are here

Blog

5 easy steps to monitoring your ESX hosts using Opsview

This post summarises the work involved to successfully monitor your ESX environment using Opsview and the vSphere SDK for Perl.

Prerequisites

Ensure you have the following:

Step 1

Navigate and download the SDK Libraries that correspond to your OS Archictecture from http://communities.vmware.com/community/vmtn/developer/forums/vsphere_sdk_perl

Step 2

On the Opsview master run the following commands:

opsview@opsmstpr01:~$ sudo tar -zxvf VMware-vSphere-Perl-SDK-4.1.0-254719.x86_64.tar.gz
opsview@opsmstpr01:~$ sudo vmware-vsphere-cli-distrib/vmware-install.pl
Creating a new vSphere CLI installer database using the tar4 format.
Installing vSphere CLI.
Installing version 254719 of vSphere CLI
You must read and accept the vSphere CLI End User License Agreement to continue.
Press enter to display it.

Accept the licence agreement and the default location to install the executable files [/usr/bin]

Step 3

Download and Install the nagios plugin check_esx3 from http://exchange.nagios.org/directory/Plugins/Operating-Systems/*-Virtual-Environments/VMWare/check_esx3/details to /tmp

Step 4

On the Opsview master as user nagios run the following commands:

opsview@opsmstpr01:/tmp$ sudo chown nagios:nagios /tmp/check_esx3
opsview@opsmstpr01:/tmp$ cp /tmp/check_esx3 /usr/local/nagios/lib
opsview@opsmstpr01:/tmp$ sudo cp /tmp/check_esx3 /usr/local/nagios/libexec/

Examples

On the Opsview master as the nagios user run the following tests for the VM server

./check_esx3 -H $HOSTADDRESS$ -u root -p password -l cpu
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l runtime -s list
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l io
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l mem -s usage
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l net
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l runtime -s issues
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l runtime -s status
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l service
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l storage -s path
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l mem -s swap
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l vmfs

On the Opsview master as the nagios user run the following tests for any Guest VM on the server

./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s con
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l cpu
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l io
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l mem -s usage
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l net
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s cpu
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s issues
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s mem
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s status
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l mem -s swap
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s tools

Step 5

Create an Opsview service check and host templates. For more information see our online documentation.

Get unified insight into your IT operations with Opsview Monitor

webteam's picture
by Opsview Team,
Administrator
Opsview is passionately focused on monitoring that enables DevOps teams to deliver smarter business services, faster.

More like this

Aug 23, 2012
Blog
By Opsview Team, Administrator

In order to monitor VMware ESX and VM’s running on ESX, we will need to download and install a few items of software listed below, namely the...

Jun 19, 2012
Blog
By Opsview Team, Administrator

Introduction

In our example scenario, we are testing against “Oracle Database 11g Express Edition”, however the monitoring should be...

Dec 03, 2014
Blog
By Opsview Team, Administrator

In this guide, I will show you a quick and easy way to get open source syslog monitoring using Opsview that can also be applied to Nagios.