因为无法直接下在epel源,所以先下载aliyun镜像源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
zabbix-agent:192.168.76.156
zabbix-server:192.168.76.178
由于之前配置好zabbix-server ,所以此处不再叙述如何安装
1、
yum install eple-relase -y
2、
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
3、
systemctl stop firewalld
getenforce
【disabled】
4、
yum install zabbix-agent -y
5、
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.76.156 ServerActivity=192.168.76.156
Hostname=findsec_linux
6、
systemctl start zabbix-agent
systemctl enable zabbix-agent
7、刷新日志,看是否有报错
tailf /var/log/zabbix/zabbix_agentd.log
8、在zabbix-server的web页面

9、
“configuration”---->"hosts groups”—>“create host group”—>输入“name”为“findsec”---->“add”

添加成功

“configuration”---->"hosts”—>“create host”
添加 host name “findsec-linux”
选择groups“findsec”

修改ip为zabbix-agent的ip:192.168.76.156

10、添加模板



点击“add”

为如下页面

再次点击“add”

11、再次刷新后,有如下标记则zabbix-agent成功监控

还可以有其他方式证明zabbix-agent是否正常
ps aux | grep zabbix

或在zabbix-server端,telnet
telnet 192.168.76.156 10050

12、看最新数据是否正常监控

应用后,发现数据正常监控

自定义模板,创建监控项
1、“configuration”——> “templates”——>“create template”




搜索findsec

对监控项分类分组,创建应用程序

点击“create application”


点击“add”

创建监控项 ,点击“items”



选择key“如下”

设置之后的页面如下

点击“add”
将自定义监控模板与监控主机关联
搜索“findsec”,点击主机“findsec_linux”,----> “templates”



点击“update”

点击“update”后,模板成功应用到监控主机

看监控项数据是否正常收集

接上面,监控状态项为成功监控的

本文介绍了使用Zabbix进行监控的相关操作。因无法直接下载epel源,先下载aliyun镜像源,配置zabbix - agent和zabbix - server。详细说明了在zabbix - server的web页面添加主机组、主机、模板等步骤,还介绍了自定义模板创建监控项及关联监控主机的方法,最后验证监控数据是否正常。
230

被折叠的 条评论
为什么被折叠?



