安装zabbix客户端
yum源:
官方源:
- rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
安装官方源 - yum clean all
阿里源:
vim /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/
enabled=1
gpgcheck=0
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/frontend/
enabled=1
gpgcheck=0
安装:
yum -y install zabbix-agent (如果失败 取消校验gpgcheck=0)
配置主服务器地址
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.226.163 被动模式 zabbix-server-ip
ServerActive=192.168.226.163 主动模式 zabbix-server-ip (谁从我这里采集数据。)
Hostname=web1
启动:
systemctl start zabbix-agent
systemctl enable zabbix-agent
测试:
在zabbix-server端
安装测试工具:
yum install -y zabbix-get
zabbix_get -s 192.168.226.164(客户端的ip) -k system.uname 获取客户端的主机名 (获取到了就没问题)
创建主机组
登录web
步骤
- 主机组:组名---->主机 监控名字 IP DNS(主机名) 端口----->关联了一个监控模板