How to Install Zabbix Agent on Windows Server 2016

Zabbix is a powerful open-source monitoring platform capable of collecting metrics from network devices, Linux and Windows servers, cloud instances, and applications. The Zabbix Agent runs on monitored hosts and reports data back to the Zabbix Server or Proxy. On Windows Server 2016, the Zabbix Agent collects CPU, memory, disk, network, and Windows-specific metrics including service status, Windows event log entries, and performance counters. This guide covers downloading, installing, and configuring the Zabbix Agent on Windows Server 2016, and verifying connectivity with the Zabbix Server.

Prerequisites

You need an existing Zabbix Server or Proxy accessible over the network. Note the server’s IP address or hostname. Ensure TCP port 10051 (Zabbix Server) and TCP port 10050 (agent passive mode) are open between the server and the Windows host. Have administrator access on the Windows Server 2016 machine.

Step 1: Download Zabbix Agent

Navigate to the Zabbix download page at zabbix.com/download_agents. Select the agent version that matches your Zabbix Server version (for example 6.4 LTS). Choose Windows, AMD64, MSI. Download the Zabbix Agent MSI package to the Windows Server 2016 machine.

Alternatively, use PowerShell to download:

Invoke-WebRequest -Uri "https://cdn.zabbix.com/zabbix/binaries/stable/6.4/6.4.6/zabbix_agent-6.4.6-windows-amd64.msi" -OutFile "C:Tempzabbix_agent.msi"

Step 2: Install Zabbix Agent via MSI

Run the MSI installer as Administrator. The installer wizard prompts for the Zabbix Server IP or hostname. Enter the Zabbix Server address. The installer creates the Zabbix Agent Windows service and the default configuration file at C:Program FilesZabbix Agentzabbix_agentd.conf.

For silent installation with configuration parameters passed on the command line:

msiexec /i zabbix_agent.msi /quiet SERVER=192.168.1.10 SERVERACTIVE=192.168.1.10 HOSTNAME=WS2016-01

The parameters are: SERVER — IP of the Zabbix Server for passive checks. SERVERACTIVE — IP for active checks (agent-initiated). HOSTNAME — the host name that must match the host configured in Zabbix Server.

Step 3: Review and Edit the Configuration File

Open the configuration file at C:Program FilesZabbix Agentzabbix_agentd.conf in a text editor with administrator privileges. Key parameters to verify or customize:

Server=192.168.1.10
ServerActive=192.168.1.10
Hostname=WS2016-01
ListenPort=10050
LogFile=C:Program FilesZabbix Agentzabbix_agentd.log
LogFileSize=10
Timeout=10
EnableRemoteCommands=0

Setting EnableRemoteCommands=0 prevents the Zabbix Server from executing arbitrary commands on the agent. Enable only if required by your monitoring use case and only after reviewing the security implications.

Step 4: Start the Zabbix Agent Service

After editing the configuration, restart the agent service to apply changes:

Restart-Service "Zabbix Agent"

Verify the service is running:

Get-Service "Zabbix Agent"

Confirm it is set to start automatically:

Set-Service "Zabbix Agent" -StartupType Automatic

Step 5: Open Firewall Port 10050

For passive monitoring (Zabbix Server connecting to the agent), open inbound TCP 10050:

New-NetFirewallRule -DisplayName "Zabbix Agent" -Direction Inbound -Protocol TCP -LocalPort 10050 -Action Allow -RemoteAddress 192.168.1.10

Restricting the rule to the Zabbix Server IP reduces the attack surface. For active checks, no inbound rule is needed because the agent initiates outbound connections to port 10051.

Step 6: Add the Host in Zabbix Server

Log into the Zabbix web interface. Navigate to Configuration > Hosts > Create Host. Fill in:

Host name: WS2016-01 (must exactly match the Hostname in zabbix_agentd.conf). Groups: assign to an appropriate host group. In the Interfaces section, add Agent interface with the Windows Server IP and port 10050. Attach the template Windows by Zabbix agent from the Templates tab. Click Add to save.

Step 7: Verify Agent Connectivity

Test connectivity from the Zabbix Server using zabbix_get:

zabbix_get -s 192.168.1.50 -p 10050 -k system.uname

A successful response returns the Windows OS version string, confirming the agent is reachable and responding. On the Windows server, check the agent log for errors:

Get-Content "C:Program FilesZabbix Agentzabbix_agentd.log" -Tail 30

Step 8: Add Custom UserParameters

UserParameters allow the agent to run custom scripts and return their output as a metric. Add to zabbix_agentd.conf:

UserParameter=custom.service.status[*],powershell -NoProfile -Command "(Get-Service '$1').Status"

Restart the agent after adding UserParameters. Then create a Zabbix item with key custom.service.status[wuauserv] to monitor the Windows Update service state.

Best Practices

Match the Zabbix Agent version exactly to the Zabbix Server major version to avoid protocol incompatibilities. Use TLS encryption for agent-server communication in production by configuring TLSConnect and TLSAccept with certificates or PSK. Deploy the agent via Group Policy or a configuration management tool (Ansible, Puppet) for consistent rollout across multiple servers. Disable EnableRemoteCommands unless remote command execution is a specific monitored requirement reviewed by your security team.