Zabbix Agent installed in Windows environment

Source: Internet
Author: User

First download the Windows edition zabbix-agent:

Http://www.zabbix.com/downloads/2.0.18/zabbix_agents_2.0.18.win.zip

after downloading the zabbix_agents compressed package, there are two folders, respectively, the Bin folder and the Conf folder. Bin folder one is Win32 Zabbix_agentd, One is win64zabbix_agentd, production environment is 64 bit, here choose Win64

Create a folder in the C drive, then copy the Win64 and copy the zabbix-agent.conf into it.

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/93/12/wKiom1kH7n-jHkDeAABJsBB24n4927.png-wh_500x0-wm_ 3-wmp_4-s_2734838735.png "title=" Qq20170502102503.png "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 " Style= "width:500px;height:170px;" alt= "Wkiom1kh7n-jhkdeaabjsbb24n4927.png-wh_50"/>

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/93/12/wKiom1kH79Lwi7nIAAGu4yMR79I191.jpg "title=" Sogou May 02, 17 1032_2.jpg "width=" "height=" 251 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:251px; " alt= "Wkiom1kh79lwi7niaagu4ymr79i191.jpg"/>



Edit the zabbix_agentd.win.conf configuration file and modify the following:

server=47.93.162.108serveractive=47.93.162.108unsafeuserparameters=0userparameter=enableremotecommands= 1logremotecommands=1 include=c:\zabbix\zabbix_agentd.userparams.conf


Start Zabbix_agent, open run, enter cmd-> input to install Zabbix_agent: The following represents the installation success!

C:\zabbix\zabbix_agentd.exe-i-C C:\zabbix\zabbix_agentd.win.conf

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/93/13/wKiom1kH87LjNY4fAAE_c2eJJBw806.jpg "title=" Sogou May 02, 17 1048_3.jpg "alt=" Wkiom1kh87ljny4faae_c2ejjbw806.jpg "/>

#注意: If the subsequent startup is unsuccessful, shut down the service and then uninstall the installation: C:\zabbix\zabbix_agentd.exe-d-C C:\zabbix\zabbix_agentd.win.conf


To start the Zabbix_agent service:

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/93/11/wKioL1kH9FTw-B2SAAMPGVorM-I868.jpg "title=" Sogou May 02, 17 1051_4.jpg "width=" 650 "height=" 474 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:650PX;HEIGHT:474PX; " alt= "Wkiol1kh9ftw-b2saampgvorm-i868.jpg"/>



Use Netstat-an to see if the zabbix_agent port is listening:

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/93/13/wKiom1kH9QLjR5WGAAHBZA2agOI526.jpg "title=" Sogou May 02, 17 1054_5.jpg "alt=" Wkiom1kh9qljr5wgaahbza2agoi526.jpg "/>


If the firewall that comes with Windows itself is turned off, you do not need to turn on the 10050 port inbound rule, and if you turn on the firewall, you need to add an inbound rule.

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/93/14/wKiom1kH-FOyVN87AAKzokTzznY603.jpg "title=" Sogou May 02, 17 1108_6.jpg "width=" 650 "height=" 389 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:650PX;HEIGHT:389PX; " alt= "Wkiom1kh-foyvn87aakzoktzzny603.jpg"/>




The following explains the automatic installation of Windows version zabbix_agent:

Write a script:

::  install zabbix agent 2.2.9:: 1 In one click, modify Zabbix_server variable in script:  2, execute this script, install zabbix  automatically Agent to C disk @echo offsetlocal enabledelayedexpansion::  need to modify ip:set zabbix_server=47.93.162.108: :  replacing server ipset conf_file=%~dp0\zabbix_agents_2.2.9.win\conf\zabbix_agentd.win.conffor in a configuration file  /f  "delims="  %%a in  (' type  "%conf_file%")  do  (  set  str=%%a  set  "str=!str:127.0.0.1=%zabbix_server%!"   echo !str!>> "%conf_file%" _tmp.txt) move  "%conf_file%"   "%conf_file%" _ bak.txtmove  "%conf_file%" _tmp.txt  "%conf_file%":: 32 bit or 64 bit  process detectionif  "%processor_architecture%%processor_architew6432%" = = "x86"   (  set  _processor_architecture=32bit  goto x86)  ELSE  (  set _processor_ architecture=64bit  goto x64):x86xcopy  "%~dp0\zabbix_agents_2.2.9.win\bin\win32 " c:\zabbix_x86 /e /i /ycopy "%conf_file% " c:\zabbix_x86\ zabbix_agentd.conf /ysc stop   "Zabbix agent"  >nul 2>nulsc delete    "Zabbix agent"  >nul 2>nulc:\zabbix_x86\zabbix_agentd.exe -c c:\ Zabbix_x86\zabbix_agentd.conf -ic:\zabbix_x86\zabbix_agentd.exe -c c:\zabbix_x86\zabbix_ agentd.conf -sgoto firewall:x64xcopy  "%~dp0\zabbix_agents_2.2.9.win\bin\win64"  c:\zabbix_ x64 /e /i /ycopy  "%conf_file%"  c:\zabbix_x64\zabbix_agentd.conf /ysc stop    "Zabbix agent"  >nul 2>nulsc delete   "Zabbix agent"   >nul 2>nulc:\zabbix_x64\zabbix_agentd.exe -c c:\zabbix_x64\zabbix_agentd.conf -ic:\ Zabbix_x64\zabbix_agentd.exe -c c:\zabbix_x64\zabbix_agentd.conf -sgoto firewall:firewall: : get windows version numbersfor /f  "tokens=2 delims=["  %%G in  (' ver ')  Do  (set  _version=%%g)  For /f  "tokens=2,3,4 delims=. "  %%G in  (' Echo  %_version% ')  Do  (set _major=%%g& set _minor=%%h& set _build=% %I)  echo major version: %_major%  minor version: %_minor%.%_build%::  OS detectionIF  "%_major%" = = "5"   (  IF  "%_minor%" = = "0"  echo os  details: Windows 2000 [%_processor_architecture%]  IF  "%_minor%" = = "1"  Echo OS details: Windows XP [%_processor_architecture%]  IF  "%_ minor% "= =" 2 " IF "%_processor_architecture% "= =" 32bit " echo os details: windows  2003 [%_processor_architecture%]  IF  "%_minor%" = = "2"  IF  "%_processor_ architecture% "= =" 64bit " echo&nBsp;os details: windows 2003 or xp 64 bit [%_processor_architecture%]   ::  Open firewall 10050 port   netsh firewall delete portopening protocol=tcp  port=10050  netsh firewall add portopening protocol=tcp port=10050  name=zabbix_10050 mode=enable scope=custom addresses=%zabbix_server%)  ELSE IF   "%_major%" = = "6"   (  IF  "%_minor%" = = "0"  echo os details: windows  Vista or Windows 2008 [%_processor_architecture%]  IF  "%_minor%" = = "1"  echo os details: windows 7 or windows 2008 r2 [%_processor_ architecture%]  if  "%_minor%" = = "2"  echo os details: windows 8 or  Windows Server 2012 [%_processor_architecture%]  IF  "%_minor%" = = "3"   Echo os deTails: windows 8.1 or windows server 2012 r2 [%_processor_architecture %]  if  "%_minor%" = = "4"  echo os details: windows 10 technical  Preview [%_processor_architecture%]  ::  Open firewall 10050 ports   netsh  Advfirewall firewall delete rule name= "zabbix_10050"   netsh advfirewall  firewall add rule name= "zabbix_10050"  protocol=tcp dir=in localport=10050  action=allow remoteip=%zabbix_server%) pauserd /s /q  "%~dp0\zabbix_agents_2.2.9.win" del %0


Then you can install it with the zabbix_agent extracted files together, and the attachments are scripted and zabbix_agent files.


This article from "Wang Jiadong elder brother" blog, declined reprint!

Zabbix Agent installed in Windows environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.