监控配置流程
1、弄一台新的虚拟机当被监控的
修改主机名,创建用户
[root@localhost ~]# hostnamectl set-hostname web
[root@localhost ~]# bash
[root@web ~]# useradd -r -M -s /sbin/nologin zabbix
[root@web ~]#
2、装一下编译文件所需依赖包
[root@web ~]# dnf -y install gcc gcc-c++ make pcre-devel openssl openssl-devel
3、从官网上下载,然后解压zabbix包
[root@web ~]# cd /usr/src/
[root@web src]# ls
debug kernels zabbix-6.2.2.tar.gz
[root@web src]# tar xf zabbix-6.2.2.tar.gz
[root@web src]# ls
debug kernels zabbix-6.2.2 zabbix-6.2.2.tar.gz
[root@web src]#
4、进入刚刚解压好的包然后编译
[root@web src]# cd zabbix-6.2.2/
[root@web zabbix-6.2.2]# ./configure --help |grep agent
--enable-agent Turn on build of Zabbix agent and client utilities
--enable-agent2 Turn on build of Zabbix agent 2
[root@web zabbix-6.2.2]# ./configure --enable-agent
......
......
[root@web zabbix-6.2.2]# make install
5、配置主动模式和被动模式IP都反馈到服务端
# Mandatory: yes, if StartAgents is not explicitly set to 0
# Default:
# Server=
Server=192.168.64.128
### Option: ListenPort
# Agent will listen on this port for connections from the server.
#
# Default:
# ServerActive=
ServerActive=192.168.64.128
### Option: Hostname
# List of comma delimited unique, case sensitive hostnames.
# Required for active checks and must match hostnames as configure
d on the server.
# Hostname=
Hostname=cys //名字可以随便设置,但最后去网页上配置的时候名字必须跟这边写的一样
### Option: HostnameItem
6、然后去网页上创建主机
7、配置好了选择添加
8、创建主机组