Monitoring VMware ESXi hosts with Zabbix

As Lukas Camenzind points it out (, you can monitor ESXi hosts with Zabbix. It is not that easy though, but here is a little guide that can help you along the way. This is a mix of Lukas’ findings, some official VMware documentation and my experience.

Do not forget to read the official Zabbix documentation on installing the agent!

Use Zabbix agent for Linux 2.6

The builds (from for Linux 2.6.23 are not working with VMware ESXi VMkernel 5.1.0, so you have to grab the build for Linux 2.6.

zabbix_agentd: /lib64/ version `GLIBC_2.7' not found
(required by zabbix_agentd)

You need to modify the ESXi’s firewall

The VMware Knowledge Base has a nice tutorial on this – however it is not the best solution. They say you have to edit the main services.xml – I prefer adding a new XML file, just as Lukas describes it:

~ # cat > /etc/vmware/firewall/zabbix.xml
<!-- Firewall configuration information for Zabbix Monitoring system -->
 <rule id='0000'>
 <port type='dst'>10050</port>
 <flags>-m state --state NEW</flags>
 <rule id='0001'>
 <port type='dst'>10051</port>
 <flags>-m state --state NEW</flags>
~ #

However, the command service mgmt-vmware restart did not work in my case, so I used esxcli network firewall refresh to refresh the firewall rules. After that, you can enable the new rule to allow the agent to communicate with the Zabbix server.

Create a user for the agent

~ # zabbix_agentd --config /conf/zabbix_agentd.conf 
zabbix_agentd [2517454]: user zabbix does not exist
zabbix_agentd [2517454]: cannot run as root!

You have to create a user named zabbix, so the daemon can change its EUID. I did this with the vCenter client – no explanation here.

I did not create an init script for the service, I just started the agent daemon – the VMware host will not shut down or restart in the near future.

~ # zabbix_agentd --config /conf/zabbix_agentd.conf
~ # ps | grep zabbix
2518261 2518261 zabbix_agentd        zabbix_agentd
2518262 2518262 zabbix_agentd        zabbix_agentd
2518263 2518263 zabbix_agentd        zabbix_agentd
2518264 2518264 zabbix_agentd        zabbix_agentd
2518265 2518265 zabbix_agentd        zabbix_agentd
2518266 2518266 zabbix_agentd        zabbix_agentd
~ #

2 thoughts on “Monitoring VMware ESXi hosts with Zabbix”

Leave a Reply

Your email address will not be published. Required fields are marked *