Zabbix监控平台使用
实例
1、将zabbix server添加到zabbix web监控平台
[root@haha ~]# yum install zabbix-agent
[root@haha ~]# cd /etc/zabbix/
[root@haha zabbix]# ls
web zabbix_agentd.conf zabbix_agentd.d zabbix_server.conf
[root@haha zabbix]# vim zabbix_agentd.conf
Server=127.0.0.1 zabbix服务器的IP,agent被动监控(默认模式)
ServerActive=127.0.0.1
Hostname=haha //本机主机名
[root@haha zabbix]# systemctl restart zabbix-agent.service
[root@haha zabbix]# systemctl enable zabbix-agent.service
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent.service → /usr/lib/systemd/system/zabbix-agent.service.
root@haha ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.40.99 haha
192.168.40.100 hehe
2、将zabbix agent添加到zabbix web监控平台
[root@localhost ~]# hostnamectl set-hostname hehe
[root@localhost ~]# bash
[root@hehe ~]# scp root@192.168.40.99:/etc/hosts /etc/
root@192.168.40.99's password:
hosts 100% 198 122.5KB/s 00:00
[root@hehe ~]# cd /etc/yum.repos.d/
[root@hehe yum.repos.d]# rm -rf *
[root@hehe yum.repos.d]# cd
[root@hehe ~]# scp root@192.168.40.99:/etc/yum.repos.d/* /etc/yum.repos.d/
root@192.168.40.99's password:
CentOS-Base.repo 100% 1653 1.5MB/s 00:00
epel-modular.repo 100% 1395