1.在web01上安裝zabbix-agent
部署zabbix倉(cāng)庫(kù)
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
更換倉(cāng)庫(kù)中的url地址
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
安裝agent
yum -y install zabbix-agent
修改配置文件/etc/zabbix/zabbix_agentd.conf
Server=192.168.1.71
ListenPort=10050
#StartAgents=0
#ServerActive=192.168.1.71
Hostname=web01
說(shuō)明:
- Server: 被動(dòng)模式訪問(wèn)的zabbix-server的ip
- ServerActive: 主動(dòng)模式訪問(wèn)的zabbix-server的ip
- StartAgents :zabbix_agentd用來(lái)處理被動(dòng)檢查的實(shí)例數(shù)量,如果設(shè)置為0,則禁用被動(dòng)模式檢查而且agent不再監(jiān)聽(tīng)任何tcp端口
防火墻開(kāi)啟端口

啟動(dòng)服務(wù)
systemctl start zabbix-agent systemctl enable zabbix-agent

2.在zabbix-server的web頁(yè)面點(diǎn)擊配置---主機(jī)
點(diǎn)擊右上角 創(chuàng)建主機(jī):

點(diǎn)擊模板,選擇Template OS Linux by Zabbix agent

點(diǎn)擊更新,在主機(jī)列表中出現(xiàn)如下:

選擇 監(jiān)測(cè)---主機(jī)---web01,即可開(kāi)始觀看各種監(jiān)控?cái)?shù)據(jù)和圖形。
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。