Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The current vmware infrastructure is a mix of ESX and ESXi at 3, 3.5 and 4.1 releases. What I would like to achieve is being able to monitore the free space of the datastores through zabbix which is our current monitoring solution.

Is there a way of achieving this?

share|improve this question
+1 - I was planning on researching this in the next few weeks, you beat me to it. – Mark Henderson Jan 25 '11 at 4:56
Can you share more information of your datastore. – Sameer Jan 30 '11 at 3:58
@Sameer Datastores are a combination of local storage and SAN. – Matt Delves Jan 30 '11 at 23:32
what OS do you have zabbix running on? – JakeRobinson Feb 2 '11 at 16:00
Running on SLES 11. – Matt Delves Feb 4 '11 at 0:34
up vote 4 down vote accepted

This is trivial with the VMware API and VMware has some example scripts that you can use as a starting point. First, download the vSphere SDK for Perl 4.1 from and install it on your Zabbix server. You'll need this version to support ESX/ESXi 3.0.1 through 4.1.

Then you can use one of the included Perl scripts, such as, as a starting point for making your own custom check in Zabbix. The SDK also includes other scripts which may be useful.

share|improve this answer

If you have a vcenter server, and have upgraded to Zabbix 2.2 - the vmware monitoring is now a feature of Zabbix.

Read more here in the documentation:

share|improve this answer

There are a lot of different ways you could go about this. Probably the most painless way would be to use zabbix 1.8.x's ssh login ability to run a simple shell script on the vmware server that would return the result to you. You have to compile zabbix_server with libssh for it to have the capability to do this.

Once you've compiled zabbix server with the ssh capability, just go to the vmware server "Host" and add an "Item". From the drop down list will be "SSH Agent". Choose that, have it login to the vmware host, run the simple shell script which returns the space utilization of the datastore.

Another possibility would be to install zabbix_sender (or a homemade equivalent) on the vmware host and have it periodically send the datastore results to zabbix_server.

share|improve this answer
This is not the recommended way of doing things - the vSphere SDK already exists and communicates with the ESX (and ESXi!) hosts in a supported manner. – MikeyB Aug 27 '12 at 14:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.