Downloading Zabbix Agent 2 Package
Obtain the Zabbix agent2 archive from the official Zabbix website. The package contains two essential files:
zabbix_agent2.confzabbix_agent2.exe
Deploying on Windows Server
A single Windows host can accommodate multiple Zabbix agent instances running simultaneously.
The following procedures outline a single-instance deployment:
-
Copy both files to the root of the C: drive
-
Launch Command Prompt, navigate to the C: drive, and execute:
zabbix_agent2.exe --help
The output reveals that the default configuration file location is C:\zabbix_agent2.win.conf
- Raname
zabbix_agent2.conftozabbix_agent2.win.confand modify the following parameters:
Server=192.168.1.100
ServerActive=192.168.1.100
Hostname=WEB01
Replace 192.168.1.100 with you're Zabbix Server IP address. Set Hostname to match the target monitored Windows host.
- Register the agent as a Windows service:
c:\>zabbix_agent2.exe -c "c:\\zabbix_agent2.win.conf" -i
zabbix_agent2 [7404]: 'Zabbix Agent 2' installed successfully
Command-line flags support abbreviations: -config becomes -c, -install becomes -i.
After installation completes, the agent operates as a Windows service.
-
Start the Zabbix Agent 2 service
-
Remove the Zabbix agent2 service:
c:\>zabbix_agent2.exe -c "c:\\zabbix_agent2.win.conf" -d
When using default configuration paths for single-instance setups, the command simplifies to: zabbix_agent2.exe -d
- Configuring Multiple Agent Instances
Install:
zabbix_agent2.exe -config <config_file_1> -install -multiple-agents
zabbix_agent2.exe -config <config_file_2> -install -multiple-agents
zabbix_agent2.exe -config <config_file_N> -install -multiple-agents
Start:
zabbix_agent2.exe -config <config_file_instance> -start -multiple-agents
Uninstall:
zabbix_agent2.exe -config <config_file_1> -uninstall -multiple-agents
zabbix_agent2.exe -config <config_file_2> -uninstall -multiple-agents
zabbix_agent2.exe -config <config_file_N> -uninstall -multiple-agents
Important: Configuration file paths must be aboslute when specified explicitly.
Zabbix Server Configuration
For Zabbix Server 5.0 and later, apply the built-in template "Template OS Windows by Zabbix agent" to link the Windows host to monitoring templates.