Tech Tip: Monitoring VMware ESX 3.x, ESXi, vSphere 4 and vCenter Server
This month Anders provides insight on monitoring VMware using Nagios.
Virtualization using products from VMware has become very popular in all types of organizations during the last two years. Systems are being virtualized at a high pace and a majority of new systems are deployed as virtual machines.
Though virtualization introduces many advantages, it also brings with it new challenges like:
– making sure mis-configured VMs are not affecting other VMs
– sharing limited resources between multiple VMs
– virtualizing real-time systems
– maintaining a good level of protection against hardware failures in hosts
– maintaining a good level of monitoring of server hardware
– maintaining low impact on production systems in case of resource allocation problems
To support the work of implementing virtualization properly, without running in to problems related to these challenges, some needs become very important:
– being able to monitor multiple versions and modern versions of VMware’s products
– being able to monitor resource usage on newly deployed VMs
– being able to predict when more resources has to be added
– being able to monitor through virtualization centers
– being able to monitor server hardware health
– being able to track what VMs are running in a specific host
Even though many of these tasks can be performed in VMware’s own tools, it’s very likely you will want to automate these tasks and re-use that configuration many times. This is where a specific Nagios plugin comes in handy – check_esx3.pl.
check_esx3.pl is GPLed and was written when ESX 3.5 became widely used in production environments and check_esx only supported ESX 3.0. The plugin has evolved quickly and can as of today monitor a single ESX(i)/vSphere server or a VMware VirtualCenter/vCenter Server and individual virtual machines.
The plugin can monitor things like CPU Usage, Mem Usage, Swap Usage, Net Usage, VMFS Usage, Runtime Status, Runtime Issues, Runtime Health, IO Read, IO Write, and more. All these checks are grouped in commands with subcommands and support threshold ranges. Some commands support alternative metrics like MB instead of percent.
check_esx3.pl depends on VMware’s vSphere SDK for Perl. Installation instructions for the SDK are printed by the plugin when it’s executed without the SDK installed.
You can obtain the check_esx3 plugins by visiting Nagios Exchange:
The installation of the SDK and example usage of the plugin (check-commands) is documented in the following guides. The guides are centric op5’s Nagios-based product, but can be used to run the plugin with Nagios Core or Nagios XI:
Editor’s Note: We’d like to thank our partner op5 for their efforts in developing the check_esx3 plugin – kudos!.