Operations 6 min read

How to Set Up Zabbix VMware Monitoring: Step-by-Step Configuration Guide

Learn how to enable Zabbix’s VMware monitoring by configuring collectors, editing the server config, linking vCenter templates, adding CPU, memory, and disk usage items, and creating triggers, with detailed code snippets and screenshots to ensure comprehensive virtual machine performance tracking.

Ops Development Stories
Ops Development Stories
Ops Development Stories
How to Set Up Zabbix VMware Monitoring: Step-by-Step Configuration Guide

Overview

Since Zabbix 2.2.0, VMware monitoring is supported. Zabbix can automatically discover VMware hosts and VMs, create host objects from predefined prototypes, and apply monitoring templates. Data is collected by vmware collector processes via SOAP from the VMware Web SDK, stored in shared memory, and later retrieved by Zabbix pollers. Starting with Zabbix 2.4.4, data is split into configuration and performance types, each collected independently; therefore more collectors than monitored VMware services are recommended to avoid performance‑data retrieval delays.

Modify Configuration File

Enable VMware collector instances

<code>vim /etc/zabbix/zabbix_server.conf
StartVMwareCollectors=5
VMwareCacheSize=160M
VMwareFrequency=60
VMwareTimeout=20</code>

Restart the Zabbix server after changes

<code>systemctl restart zabbix-server</code>

Create vCenter Host

Zabbix provides three templates for vCenter monitoring: Template VM VMware (vCenter cluster status), Template VM VMware Guest (ESXi VM status), and Template VM VMware Hypervisor (ESXi host status). Linking the Template VM VMware to the vCenter host automatically associates the other two templates, enabling auto‑discovery of ESXi hosts and VMs.

Configure Host Information

The host URL is the vCenter web address.

Link the Template VM VMware template.

For security, create a read‑only vCenter user for monitoring.

Modify the monitoring templates: the default ESXi templates lack storage trigger prototypes, so add a trigger prototype for disk monitoring to the Template VM VMware template.

After defining the prototype, triggers are automatically added when disks are discovered.

Add CPU and Memory Usage Monitoring

Add CPU usage monitoring

Add item

<code>100*last("vmware.hv.cpu.usage[{$URL},{HOST.HOST}]")/(last("vmware.hv.hw.cpu.freq[{$URL},{HOST.HOST}]")*last("vmware.hv.hw.cpu.num[{$URL},{HOST.HOST}]"))</code>

Add trigger for CPU

Add Memory usage monitoring

Add item

<code>100*last("vmware.hv.memory.used[{$URL},{HOST.HOST}]")/last("vmware.hv.hw.memory[{$URL},{HOST.HOST}]")</code>

Add trigger for Memory

After configuring the host, Zabbix logs may show the error "Vmware monitoring Performance counter is not available", which causes most discovered items to be marked as unsupported. This is due to a query‑limit setting in vCenter; increase the limit or disable it to resolve.

Reference: https://kb.vmware.com/s/article/2107096

Discovery result example

Content partially referenced from Peng Ge’s public account “Open Source搬运工宋师傅”.

Feel free to discuss and share experiences.

monitoringperformanceoperationsConfigurationVMwareZabbixVirtual Machines
Ops Development Stories
Written by

Ops Development Stories

Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.