To get started, download the archive with the latest version of Zabbix agent for Windows from the official site https://www.zabbix.com/en/download_agents
Unpack the archive for example in the Windows directory. I noticed that if you unpack into a directory in the name of which there are spaces, for example, “Program Files”, the Zabbix agent service may not start.
After unpacking, open the command line (required as administrator) and go to the directory with the Zabbix agent:
We’ll edit the configuration file, I will give an example of the parameters that I changed:
# Path to the log file LogFile=C:\Windows\zabbix_agents-4.2.6-win-amd64\zabbix_agentd.log # Maximum log file size LogFileSize=1 # Logging level (0 - basic, 1 - critical messages, 2 - errors, 3 warnings, 4 - maximum for debugging) DebugLevel=3 # Zabbix server address Server=192.168.1.1 # Port on which Zabbix agent will be launched ListenPort=10050 # Zabbix server address ServerActive=192.168.1.1 # The host name for active checks must necessarily match the name specified on the Zabbix server Hostname=ixnfo.com
And we execute the service installation command with the configuration file:
"C:\Windows\zabbix_agents-4.2.6-win-amd64\bin\zabbix_agentd.exe" --config "C:\Windows\zabbix_agents-4.2.6-win-amd64\conf\zabbix_agentd.conf" --install
In the configuration file zabbix_agentd.conf, you must specify the address of the Zabbix server from which requests will be received.
The final step is to launch the Zabbix agent:
cd bin zabbix_agentd.exe --start
Below I will describe some possible operations with the program.
View program version: -V
View supported checks (data items): -p
Testing a data item: -t
For Windows NT 4.0, the PDH (Performance Data Helper) library is used, if it is not installed on the system, you can read information about it and download it from the official page https://support.microsoft.com/en-us/help/284996/
Zabbix agent will work on TCP port 10050, waiting for a connection from the IP address of the Zabbix server specified in the configuration file.