zabbix基础操作
文章目录
1、将zabbix server添加到zabbix web监控平台
[root@localhost ~]# hostnamectl set-hostname server
[root@localhost ~]# bash
[root@server ~]# hostname
server
[root@server ~]# vim /etc/hosts
[root@server ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.226.139 server
[root@server ~]# vim /etc/zabbix/zabbix_agentd.conf
192.168.226.158 agent
Hostname=server
[root@server ~]# systemctl restart zabbix-agent.service
浏览器查看
为server添加模板进行监控
2、将zabbix agent添加到zabbix web监控平台
[root@agent1 ~]# yum -y install zabbix-agent
[root@agent1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.226.139 server
192.168.226.158 agent1
[root@agent1 ~]# vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.226.139
ServerActive=192.168.226.139
Hostname=agent1
[root@agent1 ~]# systemctl restart zabbix-agent.service
[root@agent1 ~]# systemctl stop firewalld.service
[root@agent1 ~]# vim /etc/selinux/config
[root@agent1 ~]# setenforce 0
打开浏览器点击配置选择主机点击创建主机
添加主机
点击模板为主机添加模板
添加成功agent已加入监控平台中