监控配置的流程
在要监控的主机上安装agent
在agentd . conf文件中配置server地址和hostname
启动agent
在web界面上添加主机/主机组
添加监控项:手动创建监控项、模板添加监控项
添加触发器(定义阈值)
定义媒介(即通知人的方式)
为不同的用户选择媒介
为触发器配置动作
手动触发问题
验证
agent端部署(linux)
将server端之前下载好的zabbix文件传到agent端
[root@localhost ~]# scp zabbix-5.2.6.tar.gz 192.168.11.137:/root/
The authenticity of host '192.168.11.137 (192.168.11.137)' can't be established.
ECDSA key fingerprint is SHA256:uMB8QM370nDWcGKwh1pPtIsRVwhmOyP4FcfIGKVJUWM.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.11.137' (ECDSA) to the list of known hosts.
root@192.168.11.137's password:
zabbix-5.2.6.tar.gz 100% 20MB 187.8MB/s 00:00
客户端安装zabbix agent
[root@localhost ~]# tar xf zabbix-5.2.6.tar.gz -C /usr/local/
[root@localhost ~]# cd /usr/local/
[root@localhost local]# ls
bin etc games include lib lib64 libexec sbin share src zabbix-5.2.6
[root@localhost local]# mv zabbix-5.2.6/ zabbix
[root@localhost local]# yum install -y gcc* make pcre*
[root@localhost ~]# cd /usr/local/
[root@localhost local]# ls
bin etc games include lib lib64 libexec sbin share src zabbix
[root@localhost local]# cd zabbix/
[root@localhost zabbix]# ./configure --enable-agent
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
[root@localhost zabbix]#make install
[root@localhost zabbix]# zabbix_agentd
[root@localhost zabbix]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:111 0.0.0.0:*
LISTEN 0 32 192.168.122.1:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
LISTEN 0 128 0.0.0.0:10050 0.0.0.0:*
LISTEN 0 128 [::]:111 [::]:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 5 [::1]:631 [::]:*
配置agent
[root@localhost zabbix]# openssl rand -base64 20
38ukYuSSWLXVZ8gj4xOPEdHj84w=
[root@localhost zabbix]# vim /usr/local/etc/zabbix_agentd.conf
Server=192.168.11.136 #修改为server ip
ServerActive=192.168.11.136 #修改为server ip
Hostname=38ukYuSSWLXVZ8gj4xOPEdHj84w #主机名(注意:指的时候被zabbix管理的主机名,并非系统主机名。并且全局唯一)
[root@localhost zabbix]# pkill zabbix_agentd
[root@localhost zabbix]# zabbix_agentd
[root@localhost zabbix]# setenforce 0
[root@localhost zabbix]# systemctl stop firewalld
在web界面上添加主机
hostname必须和配置文件一致也就是刚刚的乱码
agent端部署(windows)
官网下载