Installing Zabbix Agent on Windows
Download zabbix agent file from http://www.zabbix.com/download.php and unzip that.
Open command prompt from Start > Run and then type cmd then click ok
Create new folder for zabbix agent
mkdir c:\Program Files\zabbix
Now copy zabbix_agentd.exe, zabbix_get.exe and zabbix_sender.exe from win32 folder if your OS is x86 else copy from win64 for x64 bit
From command prompt run following command to create configuration file for zabbix_agent
Note: - change IP Address of Zabbix server instead of 192.168.73.242 . Please be sure that commands are in single line
Echo Server=192.168.73.142 > "c:\Program Files\zabbix\zabbix_agentd.conf"
Echo Hostname=%COMPUTERNAME% >> "c:\Program Files\zabbix\zabbix_agentd.conf"
"C:\Program Files\zabbix\zabbix_agentd.exe" -c "c:\Program Files\zabbix\zabbix_agentd.conf" –i
"C:\Program Files\zabbix\zabbix_agentd.exe" -c "c:\Program Files\zabbix\zabbix_agentd.conf" –s
Now zabbix agent service is installed and started as automatic start.
OR
You can create batch file for installing zabbix agent . batch file copy that three files from share folder, Create new directory for zabbix agent then copy required files and install and start service you only need run that zabbix_agent_windows.bat file
@echo off
echo copying exe
net use m: \\ipaddOfShareHost\Share\zabbix_Windows_agent\zabbix_agents_1.8.5.win
mkdir "c:\Program Files\zabbix"
xcopy m:\win32 "c:\Program Files\zabbix"
net use m: /delete
echo Creating configuration for %COMPUTERNAME%...
echo Server=192.168.73.142 > "c:\Program Files\zabbix\zabbix_agentd.conf"
echo Hostname=%COMPUTERNAME% >> "c:\Program Files\zabbix\zabbix_agentd.conf"
echo Installing system service...
"c:\Program Files\zabbix\zabbix_agentd.exe" -c "c:\Program Files\zabbix\zabbix_agentd.conf" -i
echo Starting agent...
"c:\Program Files\zabbix\zabbix_agentd.exe" -c "c:\Program Files\zabbix\zabbix_agentd.conf" -s
echo Finished!
pause
Nice, thanks
ReplyDeletethank you, I'm newbie w/ Zabbix so thanks a lot!
ReplyDeleteGreat article and very useful thank you!
ReplyDeleteOne challenge for me was how to install the agent on hundreds of servers. If you're interested, I've created an open source MSI builder (with WiX) to automate the install of the agent so it can be distributed via Active Directory, etc.
Please see https://github.com/cavaliercoder/zabbix-msi