When we talk about virtualization, there are many solutions in the market these days. The biggest player is still VMware, and Zabbix made it much easier for us to monitor our VMware infrastructure. In this recipe, we will show you how to set up VMware monitoring in Zabbix.
For this recipe to work, we need of course, a Zabbix server with the necessary admin rights and of course a VMware server that we can monitor. VMware monitoring is available since Zabbix 2.2. The minimum required version of VMware vCenter or vSphere is 4.1.
If you compile Zabbix, then make sure that you compile it with the --with-libxml2
and --with-libcurl
options, else VMware monitoring will not work.
zabbix_server.conf
file:StartVMwareCollectors = 1
VMwareCacheSize = 8M
VMwareFrequency = 60
zabbix_server.conf
file.Template Virt VMware
:{$PASSWORD}
, we also need to add {$USERNAME}
and {$URL}
.The username and password are obvious. For the {$URL}
field, we need to add the URL to the vCenter API; this should be https://MyVcenter/sdk
where MyVcenter
is the DNS name or even better the IP to your vCenter.
Zabbix comes with some ready-made templates to monitor our VMware server. The only thing we need to do is provide Zabbix with the needed credentials such as the username, password, and the proper link to the SDK from our VMware server. It would be best if the account that we use here is an account that is only available for Zabbix as the credentials are easy to read by anyone with Zabbix administration rights.
If the user is in a Windows domain, you need to define the macro {$USERNAME}
such as this: MYDomainSomeUser
.