Would you like to learn how to use Zabbix to monitor a Vmware ESXi server and all the virtual machines? In this tutorial, we are going to show you how to configure Zabbix to monitor a Vmware ESXi server.

• Zabbix version: 3.4.12

This tutorial was tested on VMware ESXi 5.5.

This tutorial was tested on VMware ESXi 6.0.

This tutorial was tested on VMware ESXi 6.5.

Hardware List:

The following section presents the list of equipment used to create this Zabbix tutorial.

Every piece of hardware listed above can be found at Amazon website.

Zabbix Playlist:

On this page, we offer quick access to a list of videos related to Zabbix installation.

Don't forget to subscribe to our youtube channel named FKIT.

Tutorial - Enable Zabbix Vmware Monitoring

First, we need to edit the Zabbix server configuration file and enable the Vmware monitor feature.

On the Linux console, use the following commands to find the location of the zabbix_server.conf file.

In our example the zabbix_server.conf file was located under /usr/local/etc.

After finding, you need to edit the zabbix_server.conf file.

# updatedb
# locate zabbix_server.conf
# vi /usr/local/etc/zabbix_server.conf

Here is the original file, before our configuration.

LogFile=/tmp/zabbix_server.log
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=kamisama321
Timeout=4
LogSlowQueries=3000

Add StartVMwareCollectors=5 at the end of the configuration file

Here is the new file with our configuration.

LogFile=/tmp/zabbix_server.log
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=kamisama321
Timeout=4
LogSlowQueries=3000
StartVMwareCollectors=5

In our example, the Zabbix server was configured to start automatically 5 Vmware collector processes.

Now, you need to restart the Zabbix service.

If you used our installation guide, you can restart Zabbix using the following command:

# /etc/init.d/zabbix-server restart

If the Zabbix server was started successfully, you should see a message similar to this on the log file:

12278:20180806:154520.163 VMware monitoring: YES
12296:20180806:154520.189 server #17 started [vmware collector #2]

12299:20180806:154520.189 server #20 started [vmware collector #5]

12297:20180806:154520.189 server #18 started [vmware collector #3]

12295:20180806:154520.189 server #16 started [vmware collector #1]

12298:20180806:154520.221 server #19 started [vmware collector #4]

In our example, the Zabbix server log file zabbix_server.log is located inside the /tmp directory.

In our example, the Zabbix server started  5 Vmware data collector processes automatically.

Congratulations! you have enabled the feature required to monitor Vmware on Zabbix.

You can now use the Zabbix server dashboard to add Vmware ESXi to the network monitoring service.

Tutorial - Zabbix Monitor Vmware ESXi Server

Now, we need to access the Zabbix server dashboard and add the Linux computer as a Host.

Open your browser and enter the IP address of your web server plus /zabbix.

In our example, the following URL was entered in the Browser:

• http://35.162.85.57/zabbix

On the login screen, use the default username and default password.

• Default Username: Admin
• Default Password: zabbix

zabbix login

After a successful login, you will be sent to the Zabbix Dashboard.

zabbix dashboard

On the dashboard screen, access the Configuration menu and select the Host option.

zabbix add host

On the top right of the screen, click on the Create host button.

Zabbix Create Host

On the Host configuration screen, you will have to enter the following information:

• Host Name - Enter a Hostname to identify the Vmware ESXi server.
• Visible Hostname - Repeat the hostname.
• New group - Enter a name to identify a group of similar devices.
• Agent Interface - Enter the IP address of the Vmware ESXi.

Here is the original image, before our configuration.

zabbix linux - Antes

Here is the new image with our configuration.

Zabbix Vmware Host

Next, we need to configure the Vmware login information and IP address using Macros.

Zabbix will use this information to connect to the Vmware server and collect data.

Access the Macros tab on the top of the screen and create the following macros:

• {$USERNAME} - root

• {$PASSWORD} - root password

• {$URL} - https://+ Vmware server IP address +/sdk.

Zabbix connect Vmware ESXI server

Next, we need to associate the host with a specific network monitor template.

By default, Zabbix comes with a large variety of monitoring templates.

Access the Templates tab on the top of the screen.

Click on the Select button and locate the template named: TEMPLATE VM VMWARE.

zabbix vmware monitor template

Click on the Add button (1).

Click on the Add button (2).

After a few minutes, you will be able to see the initial result on the Zabbix Dashboard.

The final result will take at least two hours.

By default, Zabbix will wait 1 hour to discover the virtual machines available on the ESXi server.

By default, Zabbix will wait 1 extra hour to discover the virtual machines disk and network interfaces.

Congratulations! You have configured Zabbix to monitor a Vmware ESXi server.

Congratulations! You have configured Zabbix to monitor all virtual machines from a Vmware ESXi server.