wlyyb521 发表于 2019-1-18 06:39:31

ZABBIX(二) zabbix 监控第一台服务器

  一、搭建一台测试服务器
  1、安装一台centos7操作系统

  本次测试我在虚拟机上安装了一台centos7.2的操作系统:

http://s1.运维网.com/images/20180704/1530683880287179.png
  2、在Centos7.2的操作系统上安装zabbix 的angent服务:

  (1)导入软件安装源

  rpm -ivh http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
http://s1.运维网.com/images/20180704/1530685832542360.png
  (2)安装zabbix-agent客户端服务

  yum -y install zabbix-agent
http://s1.运维网.com/images/20180704/1530687535954302.png
  (3)zabbix 客户端配置

  配置zabbix_server配置文件:
  vim /etc/zabbix/zabbix_agentd.conf
  修改以下配置信息:
  EnableRemoteCommands=1      #允许zabbix服务器端远程操作
  LogRemoteCommands=1          #开启远程执行命令日志
  Server=192.168.40.134            #zabbix服务器端IP地址
  ServerActive=192.168.40.134   #zabbix服务器端IP地址
  Hostname=zabbix_agent         #该值跟zabbix web上配置的主机名称要一致(配置-》主机-》主机名称
  (4)启动zabbix-agent服务

  systemctl start zabbix-agent

  ps aux | grep zabbix-agent

http://s1.运维网.com/images/20180704/1530694845149060.png
  3、zabbix监控服务器

  zabbix服务器通过创建主机来监控服务器设备,选择相应的监控模板,过一段时间后,就可以看到被监控的服务器设备的CPU、内存、硬盘等使用情况。

  (1)创建主机

  选择“配置”-“主机”然后点击“创建主机”:

http://s1.运维网.com/images/20180704/1530695228832824.pnghttp://s1.运维网.com/images/20180704/1530695735170489.png      选择相应模板:
http://s1.运维网.com/images/20180704/1530695862351171.png
  点击添加,然后查看主机是否被添加成功:

http://s1.运维网.com/images/20180704/1530711312627030.png
  根据添加的模块,可以监控到数据,查看被监控项的数据图形:

  选择被监控的设备,点击“图形”然后点击要查看的监控项:

http://s1.运维网.com/images/20180704/1530711833872208.png
  然后点击“预览”

http://s1.运维网.com/images/20180704/1530711887820896.png
http://s1.运维网.com/images/20180704/1530711932332117.png



页: [1]
查看完整版本: ZABBIX(二) zabbix 监控第一台服务器