查看客戶端環境:
# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # uname -r 3.10.0-327.28.2.el7.x86_64
Centos7 客戶端:
地址:http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-agent-3.2.0-1.el7.x86_64.rpm
#rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-agent-3.2.0-1.el7.x86_64.rpm
Centos6客戶端:
http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-agent-3.2.0-1.el6.x86_64.rpm
Centos5客戶端:
http://repo.zabbix.com/zabbix/3.2/rhel/5/x86_64/zabbix-agent-3.2.0-1.el5.x86_64.rpm
網頁下載:
http://www.zabbix.com/download.php
配置:
#yum clean all #yum -y install zabbix zabbix-agent 配置: vim /etc/zabbix/zabbix_agentd.conf Server=192.168.0.50 ServerActive=192.168.0.50 配置完以上之后就是添加監控主機了
檢測:
ps –ef | grep zabbix
netstat -n | grep 10050 (默認使用 100050 端口)
啟動並開機:
#systemctl start zabbix-agent
#systemctl enable zabbix-agent
windows
下載客戶端 https://www.zabbix.com/download
解壓放到C盤
找到conf下的配置文件 zabbix_agentd.win.conf ,修改LogFile、Server、、ServerActive、Hostname這四個參數。具體配置如下:
LogFile=c:\zabbix_agentd.log
Server=192.168.7.50
Hostname=download
ServerActive=192.168.7.50 #zabbix server地址
其中logfile是zabbix日志存放地址。Server 是zabbix服務端ip地址。Hostname是本機機器名。
配置好后,開始安裝zabbix-agent,其實就是將zabbix-agent添加到windows服務中;
在windows控制台下執行以下命令:
c:\bin\win64\zabbix_agentd.exe -c c:\conf\zabbix_agentd.win.conf -i
啟動命令
c:\bin\win64\zabbix_agentd.exe -c c:\conf\zabbix_agentd.win.conf -s
參數含義:
-c 制定配置文件所在位置
-i 是安裝客戶端
-s 啟動客戶端
-x 停止客戶端
-d 卸載客戶端
通過查看C盤下的日志文件和 查看端口 netstat -an | find "10050" 是否已經啟動
服務控制台也可以看見,zabbix-agent已經添加到了服務列表中
我們在zabbix-server上添加主機了;