Monitoring a server running a VMware vSphere ESXi v5 hypervisor

Note: This post was prepared by a technical expert, in the process of finding the best solution on a test server.

There was a need to organize monitoring of the correct operation of the LSI MegaRAID family controllers on servers running the VMware vSphere ESXi v5.5 hypervisor – and, accordingly, to automatically receive notifications in case of any failures (for example, failure of one of the HDDs). In the process of the testing, it turned out that the solution is not limited to hypervisor data stores.

To solve this task, we used a test server based on the Supermicro X9DR3/i-F motherboard with an LSI MegaRAID SAS 9260-4i controller, to which two HDDs were connected and RAID1 was configured.

Even though LSI MegaRAID SAS 9260-4i is officially supported by ESXi, you won't be able to get any RAID status information from the Health Status section of the VMware vSphere client: VMware vSphere - Supermicro X9DR3-F

Fortunately, this is fixable. We go to the lsi.com website and find the archive with «SMIS Provider» for the desired controller there: Choose on site SMIS Provider

Download, unpack and find the file with the «vib» extension. This is a package that provides controller status monitoring using the built-in ESXi sensor mechanism. Copy this vib to the server, connect to it via SSH and install:
esxcli software vib install -v /vmfs/volumes/datastore1/500.04.V0.53-0003.vib We copy the vib to the server and connect via SSH

We reboot the server, connect to it again via SSH and make sure that the package is installed:
esxcli software vib list | grep -i lsi check the installation of packages

Now in the «Health Status» section, we can observe the status of the LSI MegaRAID controller: Checking the LSI MegaRAID controller in VMware vSphere

Colocation

Colocation

Find out how to store your server in secure data center in Germany

Read More

Automation of sensor polling

But, of course, this is not enough to organize automatic monitoring because we won't know about the failure until we start the VMware vSphere client. It is necessary to automate the procedure for sensor polling. To do this, we use the “check_esxi_hardware.py” script, available at http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php It is mainly an extension for Nagios, but it is quite universal and easily connected to other monitoring systems.

The script is written in the Python programming language and requires the PyWBEM library. Under Linux Debian and Ubuntu, it is installed through the standard system repositories:
apt-get install python-pywbem

The syntax for running «check_esxi_hardware.py» is quite simple:
check_esxi_hardware.py -H XXX.YYY.WWW.ZZZ -U root -P XXXXXXXX

In response, you will receive a brief report on the health of the server:
OK - Server: Supermicro X9DR3-F s/n: 0123456789 System BIOS: 3.0a 2013-07-31

You can make sure that the script polls the status of all sensors, including the LSI MegaRAID controller, by turning on detailed output of information:
check_esxi_hardware.py -H XXX.YYY.WWW.ZZZ -U root -P XXXXXXXX -v VMware vSphere

The disadvantage of the script is that in order to poll the sensors, it needs the authorization data of the hypervisor administrator. It may not necessarily be root, but it must have the appropriate rights, otherwise it will not poll the sensors.

Let's try to simulate the failure of one of the HDDs. We reboot the server and go to the controller's WebBIOS. Choose one of the hard drives: WebBIOS

Let's go to its properties: WebBIOS properties

And disable: disable the disk in WebBIOS

We load the hypervisor and in the VMware vSphere client we see that there really is a failure: VMware vSphere crash

And here is what "check_esxi_hardware.py" produces: heck_esxi_hardware.py

Was this article helpful?

Did you like the article?

Cookie consent

By clicking «I agree», you consent to our website's use of cookies to give you the most relevant experience by remembering your preferences and repeat visits. However, you may visit «Manage сookies» to provide controlled consent. Learn more

Cookies settings

functional

Necessary cookies are crucial for the basic functions of the website and the website will not work in its intended way without them.

Analytics

Analytical cookies are used to understand how visitors interact with the website.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns.