标签:
下载与解压
下载zabbix_agents_2.2.0
http://www.zabbix.com/downloads/2.2.0/zabbix_agents_2.2.0.win.zip
解压到C盘下面, 安装不一定解压到C盘下面, 但是配置文件一定在C盘根目录下
进入文件夹后看到的是
conf目录存放是agent配置文件 bin文件存放windows下32位和64位安装程序
配置zabbix_agentd.win.conf
找到conf下的配置文件 zabbix_agentd.win.conf ,修改LogFile、Server、Hostname这三个参数。具体配置如下:
LogFile=c:\zabbix_agents_2.2.0.win\zabbix_agentd.log
Server=192.168.140.133
Hostname=客户端主机名
ServerActive=192.168.140.133 #zabbix server地址
其中logfile是zabbix日志存放地址。Server 是zabbix服务端ip地址。Hostname是本机机器名。
对于windows系统, 在cmd下输入hostname可得主机名
安装agent客户端
改完了之后, 将其复制一份, 放到C盘根目录下, 并改名为zabbix
在windows控制台下执行以下命令:
我的windows是64位的, 应该使用64位的吧
C:\zabbix_agents_2.2.0.win\bin\win64\zabbix_agentd.exe –c C:\zabbix_agents_2.2.0.win\conf\zabbix_agentd.win.conf –i
但是这样执行会报错
应该是进入到目录下, 然后再执行
启动agent客户端
C:\zabbix_agents_2.2.0.win\bin\win64\zabbix_agentd.exe –c C:\zabbix_agents_2.2.0.win\conf\zabbix_agentd.win.conf –s
以上也是不行的...
看看服务起了没
然后启动它
再到目录下看看, 有日志了哟
日志内容如下:
2332:20160801:094359.325 Starting Zabbix Agent [yangxu-PC]. Zabbix 2.2.0 (revision 40147).
2332:20160801:094359.326 using configuration file: C:\zabbix_agents_2.2.0.win\conf\zabbix_agentd.win.conf
5100:20160801:094359.342 agent #0 started [collector]
4484:20160801:094359.343 agent #1 started [listener #1]
4624:20160801:094359.344 agent #2 started [listener #2]
3204:20160801:094359.344 agent #3 started [listener #3]
3300:20160801:094359.344 agent #4 started [active checks #1]
3300:20160801:094420.367 active check configuration update from [192.168.140.133:10051] started to fail (cannot connect to [[192.168.140.133]:10051]: [0x0000274C] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。)
3300:20160801:094923.482 active check configuration update from [192.168.140.133:10051] is working again
3300:20160801:094923.482 no active checks on server: host [yangxu-PC] not found
4324:20160801:095039.457 Starting Zabbix Agent [yangxu-PC]. Zabbix 2.2.0 (revision 40147).
4324:20160801:095039.457 using configuration file: C:\zabbix_agents_2.2.0.win\conf\zabbix_agentd.win.conf
4596:20160801:095039.460 agent #0 started [collector]
3644:20160801:095039.460 agent #1 started [listener #1]
2684:20160801:095039.460 agent #4 started [active checks #1]
4244:20160801:095039.460 agent #2 started [listener #2]
4660:20160801:095039.461 agent #3 started [listener #3]
2684:20160801:095039.468 no active checks on server: host [yangxu-PC] not found
3300:20160801:095123.503 no active checks on server: host [yangxu-PC] not found
应为我还没有开启zabbix server嘛, 不失败才怪嘞
登录到浏览器界面
一定要给主机添加模板, 不然那个Z一直都是灰色的
不要忘了点击添加按钮, 然后存档
标签:
原文地址:http://www.cnblogs.com/tuhooo/p/5727622.html