Windows System One-click Install Zabbix Agent

Source: Internet
Author: User

Download the attachment in the Zabbix_agents_auto_installer.win.rar, unzip and modify the Autoinstall.bat in the Zabbix_server IP, Running the Autoinstall.bat,zabbix agent as an administrator registers as a service and starts. The 32-bit system will be installed in the c:\zabbix_x86,64 bit and will be installed in c:\zabbix_x64.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6C/CB/wKiom1VSBHmzLJzBAAODcGRnGBA921.jpg "title=" Qq20150512214419_meitu_1.jpg "alt=" Wkiom1vsbhmzljzbaaodcgrngba921.jpg "/>

Here is a autoinstall.bat code for your reference:

::  One-click Installation zabbix agent 2.2.9, theory support all Windows system::  have a bug please contact qicheng0211.blog.51cto.com:: 1, Modify the Zabbix_server variable in this script::  2, execute this script, automatically install zabbix agent to C drive @echo offsetlocal  enabledelayedexpansion::  need to modify the Server ipset in the ipset zabbix_server=192.168.20.211::  replacement configuration file  conf_file=%~dp0\zabbix_agents_2.2.9.win\conf\zabbix_agentd.win.conffor /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 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 port   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


This article is from the "Start Linux blog" blog, make sure to keep this source http://qicheng0211.blog.51cto.com/3958621/1650789

Windows System One-click Install Zabbix Agent

Related Article

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.