- 主机是指网络上可以被监控的对象,包括物理机、虚拟机、路由器、打印机、java虚拟机进程等;不过需要注意的时,不同主机其支持的监控方式可能会不尽相同,如路由器交换机不支持zabbix agent就只能使用snmp协议监控,java虚拟机只能使用JMX监控方式 可以通过IP或主机名指定 登录到zabbix web界面,选择配置,然后选择主机,创建主机
- 配置主机组
- 添加主机
- 添加监控项
- 添加触发器
- 配置用户媒介
- 配置告警方式和动
// 解压 [root@localhost ~]# cd /usr/src/ [root@localhost src]# ls debug kernels zabbix-5.4.4.tar.gz [root@localhost src]# tar xf zabbix-5.4.4.tar.gz [root@localhost src]# ls debug kernels zabbix-5.4.4 zabbix-5.4.4.tar.gz // 安装编译工具、依赖包 [root@localhost src]# yum -y install gcc gcc-c++ make [root@localhost src]# yum -y install pcre-devel // 创建系统账户 [root@localhost src]# useradd -r -M -s /sbin/nologin zabbix [root@localhost src]# //进行编译安装agent [root@localhost zabbix-5.4.4]# ./configure --enable-agent [root@localhost zabbix-5.4.4]# make install //随机生成唯一主机名,修改进agent配置文件/usr/local/etc/zabbix_agentd.conf [root@localhost ~]# tr -dc A-za-z < /dev/urandom | head -c 10 | xargs yUxpZYqt_H //随机生成唯一主机名 [root@localhost ~]# vim /usr/local/etc/zabbix_agentd.conf Server=192.168.25.146 //修改此三行 ServerActive=192.168.25.146 //服务端IP Hostname=yUxpZYqt_H [root@localhost etc]# [root@localhost etc]# systemctl stop firewalld.service [root@localhost etc]# systemctl disable firewalld [root@localhost etc]# setenforce 0 [root@localhost etc]# zabbix_agentd [root@localhost etc]# ss -antl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0:10050 0.0.0.0:* LISTEN 0 128 0.0.0.0:22 0.0.0.0:* LISTEN 0 128 [::]:22 [::]:*4.2在web界面添加主机



