Zabbix can use low-level discovery rules to automatically discover VMware hypervisors and virtual machines, and create hosts to monitor them based on pre-defined host prototypes.
Zabbix also includes ready-to-use templates for monitoring VMware vCenter or ESXi hypervisors.
The minimum required VMware vCenter or vSphere version is 5.1.
Virtual machine monitoring consists of two steps:
Zabbix vmware collector processes collect virtual machine data - the processes obtain necessary information from VMware web services over the SOAP protocol, pre-process it, and store it in Zabbix server shared memory.
Zabbix poller processes retrieve data using Zabbix simple check VMware monitoring item keys.
Zabbix divides collected data into VMware configuration data and VMware performance counter data. Both types of data are collected independently by the vmware collector processes.
The following statistics are available based on the VMware performance counter information:
For the complete list of items that obtain data from VMware performance counters, see VMware monitoring item keys.
Note that the frequency of VMware event retrieval depends on the polling interval of vmware.eventlog, but cannot be less then 5 seconds.
If Zabbix server is compiled from sources, it must be compiled with the --with-libcurl --with-libxml2
configuration options to enable virtual machine monitoring. Zabbix packages are compiled with these options already enabled.
The following Zabbix server configuration file parameters can be modified for virtual machine monitoring:
It is recommended to enable more collectors than the number of monitored VMware services; otherwise, the retrieval of VMware performance counter statistics might be delayed by the retrieval of VMware configuration data (which takes a while for large installations).
Generally, the value of StartVMwareCollectors
should not dip below 2
and should not exceed twice the amount of monitored VMware services: Amount of services < StartVMwareCollectors
< (Amount of services * 2). For example, when monitoring one VMware service, set StartVMwareCollectors
to 2
; when monitoring three services, set StartVMwareCollectors
to 5
.
Note that the required number of collectors also depends on the scope of the VMware environment, and the VMwareFrequency
and VMwarePerfFrequency
configuration parameters.
To support datastore capacity metrics, ensure that the value of the VMware vpxd.stats.maxQueryMetrics
key is set to at least 64
. For more information, see the VMware Knowledge Base article.
Zabbix can use low-level discovery rules (for example, vmware.hv.discovery[{$VMWARE.URL}]) to automatically discover VMware hypervisors and virtual machines. Moreover, Zabbix can use host prototypes to automatically generate real hosts for the discovered entities. For more information, see Host prototypes.
For a basic example of how to set up Zabbix for monitoring VMware using the VMware FQDN template, see Monitor VMware with Zabbix.
For a more detailed example of how to create a host, a low-level discovery rule, and a host prototype for monitoring VMware, see Setup example.
The data collected by the vmware collector processes can be logged for detailed debugging using debug level 5. The debug level can be configured in the server and proxy configuration files or using the runtime control option -R log_level_increase="vmware collector,N"
, where "N" is the process number.
For example, to increase the debug level from 4 to 5 for all vmware collector processes, run the following command:
To increase the debug level from 4 to 5 for the second vmware collector process, run the following command:
When extended logging of VMware collector data is no longer required, it is recommended to decrease the debug level to default (3) by running the -R log_level_decrease
command.
config.vpxd.stats.maxQueryMetrics
is invalid or exceeds the maximum number of characters permitted error, add a config.vpxd.stats.maxQueryMetrics
parameter to the vCenter Server settings. The value of this parameter should be the same as the value of maxQuerysize
in VMware's web.xml file. For more information, see VMware Knowledge Base article.