以A機房為例,安裝部署在192.168.10.102服務器上。
- 添加Zabbix安裝源
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
yum clean all
yum install munin --nogpgcheck
- 安裝Agent服務
yum install zabbix-agent
- 配置Agent
vi /etc/zabbix/zabbix_agent.conf
Server=192.168.10.101 # Zabbix proxy地址
LogFileSize=512
ServerActive=192.168.10.101
Hostname=DOMAIN_ZONEA_192.168.10.102_CPU
Timeout=10 # 超時時間,默認是3秒,根據(jù)網(wǎng)絡情況而定,建議設置為10秒
- 在Server端創(chuàng)建Host
以管理員身份登錄
Configuration ---> Hosts ---> Create host
其中,Host name填寫DOMAIN_ZONEA_192.168.10.102_CPU,Visible name填寫:機房A_192.168.10.102,Groups:選Linux servers、Templates以及自定義的分組,Agent interfaces:填寫機房A的防火墻IP123.123.123.124,Monitored by proxy選擇剛創(chuàng)建的代理DOMAIN_ZONEA_192.168.10.101_PROXY,其他默認即可。
添加模板
Hosts --->DOMAIN_ZONEA_192.168.10.102_CPU ---> Templates
選擇 “Template OS Linux by Zabbix agent active”模板,Update添加即可。 - 啟動Proxy服務
systemctl restart zabbix-agent
- 添加為開啟自啟動
systemctl enable zabbix-agent
- 回到Server查看host
Monitoring ---> Graph
其中,Group選Linux servers,Host選DOMAIN_ZONEA_192.168.10.102_CPU,Graph選想查看的監(jiān)控項,不出意外的話,幾十秒內就會有結果了,或者多等幾分鐘。