zabbix agent安装与配置篇
Zabbix监控windows部署安装
Zabbix agent 在windows上安装部署
(1)手工安装zabbix agent客户端
1、 下载与解压
地址: http://www.zabbix.com/downloads
解压zabbix_agents_X.X.X.win.zip
conf目录存放是agent配置文件 bin文件存放windows下32位和64位安装程序
2、 配置与安装
2.1 配置zabbix agent相关配置。
找到conf下的配置文件 zabbix_agentd.win.conf ,修改LogFile、Server、Hostname这三个参数(其他参数可根据个人需求添加),具体配置如下:
LogFile=c:\zabbix_agentd.log #根据个人习惯配置log存放的路径
Server=192.98.8.224 #zabbix服务器的IP地址
Hostname=f523540。#hostname的标识需要和服务器配置的一致,否则后期会出现not found hostname等错误
ServerActive=192.98.8.224 #zabbix server地址
其中logfile是zabbix日志存放地址。Server 是zabbix服务端ip地址。Hostname是本机机器名。
2.2 安装agent
在windows控制台下执行以下命令:
E:\zabbix\bin\win32\zabbix_agentd.exe -c E:\zabbix\conf\zabbix_agentd.win.conf –i
2.3 启动agent客户端
启动命令如下:
E:\zabbix\bin\win32\zabbix_agentd.exe -c E:\zabbix\conf\zabbix_agentd.win.conf –s
参数含义:
-c 制定配置文件所在位置
-I 是安装客户端
-s 启动客户端
-x 停止客户端
-d 卸载客户端
2.4 在"运行"输入 "services.msc",在里面找到"ZABBIXAGENT",并启动服务。
批处理具体内容如下:
:: 一键安装zabbix agent ,理论支持所有windows系统
:: 1、修改本脚本里的zabbix_server变量
:: 2、执行本脚本,自动安装zabbix agent到C盘
@Echo off
setlocal enabledelayedexpansion
:: 需要修改IP
set zabbix_server=192.168.20.211
:: 替换配置文件中的server ip
set conf_file=%~dp0\zabbix_agents.win\conf\zabbix_agentd.win.conf
for /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.txt
move "%conf_file%"_tmp.txt "%conf_file%"
:: 32 bit or 64 bit process detection
IF "%PROCESSOR_ARCHITECTURE%%PROCESSOR_ARCHITEW6432%"=="x86" (
set _processor_architecture=32bit
goto x86
) ELSE (
set _processor_architecture=64bit
goto x64
)
:x86
xcopy "%~dp0\zabbix_agents.win\bin\win32" c:\zabbix_x86 /e /i /y
copy "%conf_file%" c:\zabbix_x86\zabbix_agentd.conf /y
sc stop "Zabbix Agent" >nul 2>nul
sc delete "Zabbix Agent" >nul 2>nul
c:\zabbix_x86\zabbix_agentd.exe -c c:\zabbix_x86\zabbix_agentd.conf -i
c:\zabbix_x86\zabbix_agentd.exe -c c:\zabbix_x86\zabbix_agentd.conf -s
goto firewall
:x64
xcopy "%~dp0\zabbix_agents_2.2.9.win\bin\win64" c:\zabbix_x64 /e /i /y
copy "%conf_file%" c:\zabbix_x64\zabbix_agentd.conf /y
sc stop "Zabbix Agent" >nul 2>nul
sc delete "Zabbix Agent" >nul 2>nul
c:\zabbix_x64\zabbix_agentd.exe -c c:\zabbix_x64\zabbix_agentd.conf -i
c:\zabbix_x64\zabbix_agentd.exe -c c:\zabbix_x64\zabbix_agentd.conf -s
goto firewall
:firewall
:: Get windows Version numbers
For /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 detection
IF "%_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%]
:: 开启防火墙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%]
:: 开启防火墙10050端口
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%
)
pause
rd /s /q "%~dp0\zabbix_agents_2.2.9.win"
del %0
zabbix agent安装与配置篇的更多相关文章
- zabbix agent安装(三)
转载于https://mp.weixin.qq.com/s/33ab-JLoRfMkeI4aZDciJQ 前一篇文章介绍了zabbix server安装,这篇文章主要讲解zabbix agent安装以 ...
- zabbix agent安装详解
安装 Installing repository configuration package Zabbix 2.2 for RHEL5, Oracle Linux 5, CentOS 5: rpm - ...
- Android Studio 的安装和配置篇(Windows篇)
上一篇介绍完了Android Studio,这一篇就专门来讲讲怎么安装配置的吧. 其实好多人都卡到安装配置这一步,想当初我也是,万恶的XX防火墙,导致下载Android Studio 的gradle异 ...
- zabbix客户端安装和配置(windows)
下载相应版本客户端软件 zabbix_agents_2.4.4.win.zip 安装步骤 解压 1.如果是64位系统,则把\bin\win64\下面的三个文件拷贝到c:\zabbix目录下:如果是32 ...
- Zabbix 客户端安装教程(第二篇)
Zabbix 客户端安装教程 blog地址:http://www.cnblogs.com/caoguo [root@localhost ~]# yum install -y gcc make [roo ...
- zabbix客户端安装和配置(linux)
zabbix源码安装客户端 # tar -xvf zabbix-.tar.gz # mv zabbix- zabbix # cd zabbix # ./configure --prefix=/usr/ ...
- 监控软件之open-falcon安装、配置篇
2019-07-10 一.open-falcon简介 open-falcon是由小米运维团队,从互联网公司角度为出发点,开发出来的一套面向互联网行业的企业级的开源监控系统,截至2019年7月,open ...
- Zabbix Agent安装与卸载
cmd /c "C:\zabbix\bin\win64\zabbix_agentd.exe -c c:\zabbix\conf\zabbix_agentd.win.conf -i" ...
- window上安装zabbix agent使用案例
下载对应的zabbix windows版本 因为zabbix server使用的版本为3.2.0版本 所以下载window 3.2的版本 https://www.zabbix.com/download ...
随机推荐
- Android笔记:android的适配
public int Dp2Px(Context context, float dp) { final float scale = context.getResources().getDisplayM ...
- html+css做的丝带标签
先上效果: HTML: <div class="tag"> <div class="tag-box"> <div class=&q ...
- 卸载 ibus 使Ubuntu16.04任务栏与启动器消失 问题解决
经查证是unity误卸载了,我使用了命令: sudo apt-get remove --purge ibus 解决方法是: 使用以下命令:重置compiz: dconf reset -f /org/c ...
- chrome 不支持window.webkitNotifications.createNotification消息通知API了
今天惊奇的发现,chrome22里已经不支持window.webkitNotifications.createHTMLNotification方法了: 但是,在chrome extension里还可以 ...
- SpringMVC学习(二)
SpringMVC入门(注解方式) 需求 实现商品查询列表功能. 第一步:创建Web项目 springmvc02 第二步:导入jar包 第三步:配置前端控制器 在WEB-INF\web.xml中配置前 ...
- Blender使用基础
快捷键 -- 鼠标放在“大纲视图” -- .(小键盘) 定位到所选对象(该键的英文为period) -- 鼠标放在“3D视图” -- n 打开3D视图右面属性面板(把鼠标放在面板上,按F5可以左右切 ...
- oracle的回收站介绍
昨天做的展示oracle表空间功能剩余空间的功能,发现查询表dba_free_space时特别慢,经网上搜索,说是由于表空间碎片和回收站(Oracle 10g以后才有)引起的,后来搜到一片介绍回收站的 ...
- iOS--创建炫酷的渐变色界面
{ CAGradientLayer *_layer; } //创建渐变层 _layer =[CAGradientLayer layer]; _layer.frame=self.view.frame; ...
- Codeforces632E Thief in a Shop(NTT + 快速幂)
题目 Source http://codeforces.com/contest/632/problem/E Description A thief made his way to a shop. As ...
- 近半年MVC使用后的一些习惯
半年前接新项目, 来了一个前端, 由于只有我前后台都会, 就做业务层+辅助前端显示, 于是我决定使用MVC 上面那句无关紧要的话让我改了好多遍, 转载请注明出处: http://www.cnblogs ...