To try out VMware support, we'll need the following:
- The IP address or hostname on which we have access to the VMware API
- The username for an account with permissions to retrieve the information
- The password for that account
First, the server must be compiled with VMware support. If you have installed from packages, this support most likely is included. If you installed from source, check whether the Zabbix server log file lists VMware monitoring as enabled:
VMware monitoring: YES
When compiling from source, the following options are needed for VMware support:
- --with-libcurl
- --with-libxml2
As with several other features we've explored so far, the Zabbix server doesn't start any VMware-specific processes by default. Edit zabbix_server.conf and look for the StartVMwareCollectors parameter. Add a new line and tell Zabbix to start two VMware collectors:
StartVMwareCollectors=2
Restart the server. Why two collectors? Zabbix developers recommend the number of collectors is based on the number of monitored VMware instances. For the best performance, it's suggested to start more collectors than the monitored instance count, but less than double the monitored instance count. Or if we put that in an equation, it'll be as follows: instances < StartVMwareCollectors < ( instances * 2 ). We'll start small and monitor a single instance for now, so we'll have 1 < StartVMwareCollectors < 2. It's also recommended to always start at least two VMware collectors, so the choice is obvious here. If we had two VMware instances to monitor, it would be three collectors: 2 < StartVMwareCollectors < 4.
We'll start by unleashing Zabbix on the VMware API and allowing it to automatically discover everything using the templates that're shipped with Zabbix. Once we see that it works as expected, we'll discover how we can customize and expand this monitoring, as well as look under the hood a bit at the mechanics of VMware monitoring.