In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
I. Introduction
zabbix is a popular monitoring program in the open source world, C/S architecture, running a variety of system platform installation, personal think windows platform zabbix-agent installation is the most cumbersome, unix and linux platform through automated operation and maintenance tools can be installed remotely with one click, and windows currently has no good way, so I wrote a script on the Internet (including zabbix-agent 2.4.5 client), one click to install and configure the firewall.
II. Installation script (configuration file)
Please modify zabbbix_server in the script to your zabbix server ip
@Echo offsetlocal enabledelayedexpansion:: IP needs to be modified (fill in your own zabbix server IP address)set zabbix_server=10.168.118.91:: Replace server ipset conf_file=%~ dp0\zabbix_agents_2.4.win\conf\zabbix_agentd.win.conffer/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.4.4.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.4.4.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 port 10050 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 fire wall 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.4.4.win"del %0
III. Installation package and installation instructions
Installation package name zabbix_agents_auto_installer.win.zip See attachment
The installation package contains 32-and 64-bit zabbix-agents and a configuration file, as well as automatic installation scripts.
Unzip it and find the AutoInstall.bat script tool. Double-click! zabbix-agent will automatically register as a system service and run, adding passive port 10050.
Attachment: down.51cto.com/data/2366792
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.