How to Install Zabbix Agent on Windows

A Step-by-Step Guide for Seamless Installation

Installing the Zabbix Agent on a Windows system is a fundamental step in bringing your Windows-based infrastructure under the watchful eye of your Zabbix monitoring server. The agent is a lightweight service that gathers a wealth of data from the host, providing deep insights into performance and availability. This guide provides a detailed, step-by-step walkthrough of the installation and configuration process, ensuring that even those new to Zabbix can get their agent up and running smoothly. Before you begin, ensure you have administrative privileges on the Windows machine and know the IP address or DNS name of your Zabbix server.

Step 1: Download the Zabbix Agent

The first and most crucial step is to obtain the correct Zabbix Agent package. For security and stability, always download the agent from the official Zabbix website or a trusted source like ours. Zabbix provides pre-compiled binaries for Windows in a ZIP archive.

  1. Navigate to the official Zabbix download page or our website's download section.
  2. Select the appropriate version that matches your Zabbix server. It is highly recommended to keep the agent and server versions in sync.
  3. Choose the correct architecture for your Windows system (32-bit or 64-bit). Most modern systems are 64-bit.
  4. Download the ZIP file containing the agent binaries. The process to download zabbix agent for windows is quick and easy.

Step 2: Extract the Agent Files

Once the download is complete, you need to extract the contents of the ZIP file to a permanent location on your system. It is a best practice to create a dedicated folder for the Zabbix Agent.

  1. Create a folder, for example, C:\Zabbix.
  2. Extract the contents of the downloaded ZIP archive into this newly created folder.
  3. Inside the archive, you will find two main directories: bin and conf. The bin directory contains the executable files (zabbix_agentd.exe and zabbix_sender.exe), and the conf directory contains the sample configuration file (zabbix_agentd.conf).

Step 3: Configure the Zabbix Agent

The configuration file, zabbix_agentd.conf, is the brain of the agent. This is where you tell the agent where your Zabbix server is and define its behavior. Open the C:\Zabbix\conf\zabbix_agentd.conf file in a text editor like Notepad (it's best to run it as an administrator to save the file).

You will need to modify the following key parameters:

  • Server: This is the IP address or DNS name of your Zabbix server. The agent will only accept connections from this address for passive checks. Example: Server=192.168.1.100
  • ServerActive: This is the IP address or DNS name of your Zabbix server for active checks. The agent will connect to this address to retrieve its list of tasks. Even if you plan to use only passive checks, it's good practice to set this. Example: ServerActive=192.168.1.100
  • Hostname: This is the unique, case-sensitive name of the monitored host. This name must match exactly the "Host name" you configure in the Zabbix server's web interface. A common practice is to use the computer's network name. Example: Hostname=MyWebServer01

After making these changes, save and close the configuration file. Ensure you save it in the same location (C:\Zabbix\conf\zabbix_agentd.conf).

Step 4: Install the Zabbix Agent as a Windows Service

To ensure the agent runs automatically in the background and starts up with the system, you need to install it as a Windows service. This is done using the command line.

  1. Open a Command Prompt (cmd.exe) or PowerShell as an Administrator.
  2. Navigate to the directory where you extracted the agent's binary files. Example: cd C:\Zabbix\bin
  3. Run the following command to install the service. This command tells the agent executable (zabbix_agentd.exe) to install itself as a service and specifies the location of the configuration file you just edited.
zabbix_agentd.exe -c C:\Zabbix\conf\zabbix_agentd.conf -i

You should see a message confirming that the service has been installed successfully.

Step 5: Start the Zabbix Agent Service and Configure the Firewall

Now that the service is installed, you need to start it. You also need to ensure that your Windows Firewall allows communication with the Zabbix server.

  1. Start the Service: In the same administrative command prompt, run the following command:
  2. zabbix_agentd.exe -s

    Alternatively, you can open the Services management console (services.msc), find the "Zabbix Agent" service, and click "Start". You should also configure it for "Automatic" startup.

  3. Configure Windows Firewall: You must create a firewall rule to allow incoming traffic on TCP port 10050 from your Zabbix server's IP address. This is required for passive checks to work. You can do this via the Windows Defender Firewall with Advanced Security console or by using a PowerShell command:
New-NetFirewallRule -DisplayName "Zabbix Agent" -Direction Inbound -Protocol TCP -LocalPort 10050 -RemoteAddress  -Action Allow

Replace with the actual IP address of your Zabbix server.

Step 6: Add the Host in the Zabbix Web Interface

The final step is to tell your Zabbix server about the new host you want to monitor.

  1. Log in to your Zabbix server's web interface.
  2. Navigate to Configuration > Hosts.
  3. Click the Create host button in the top right corner.
  4. In the Host name field, enter the exact same hostname you specified in the zabbix_agentd.conf file.
  5. Assign the host to one or more host groups.
  6. In the Interfaces section, click Add and select Agent. Enter the IP address of the Windows machine you are monitoring.
  7. Go to the Templates tab. Click Select and link a suitable template, such as "Windows by Zabbix agent". This will automatically apply a set of pre-defined checks to your new host.
  8. Click the Add button to save the new host.

After a few moments, the "Availability" icon for your new host in the Zabbix interface should turn green, indicating that the server is successfully communicating with the agent. You have now successfully installed and configured the Zabbix Agent on Windows and can begin exploring the rich monitoring data it provides.

How to Install Zabbix Agent