mwjhw216 发表于 2019-1-17 12:09:26

linux系统监控之zabbix agentd安装

  系统环境:
# cat /etc/redhat-release
CentOS release 5.9 (Final)
# uname -a
Linux zabbix-agentd 2.6.18-348.el5 #1 SMP Tue Jan 8 17:53:53 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
# lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 5.9 (Final)
Release:    5.9
Codename:   Final
# cd /etc/yum.repos.d/
# rm -rf *
# wget http://mirrors.163.com/.help/CentOS5-Base-163.repo
# cd ~  开始安装
# mkdir soft
# cd soft
# wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.2.2/zabbix-2.2.2.tar.gz/download
# tar xf zabbix-2.2.2.tar.gz
# cd zabbix-2.2.2
# groupadd zabbix
# useradd -g zabbix -u 201 -m zabbix
# ./configure --prefix=/usr/local/zabbix --enable-agent
# make -j 2 && make install
# cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
# chmod +x /etc/init.d/zabbix_agentd
# vim /etc/init.d/zabbix_agentd
BASEDIR=/usr/local/zabbix
# vim /usr/local/zabbix/etc/zabbix_agentd.conf
LogFile=/tmp/zabbix_agentd.log
EnableRemoteCommands=0
Server=172.16.10.10
StartAgents=8
ServerActive=172.16.10.10
Hostname=Zabbix server
Timeout=30
Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/
UnsafeUserParameters=1
# chkconfig zabbix_agentd on
# /etc/init.d/zabbix_agentd start
Starting zabbix_agentd:                                      客户端安装完成
  

  在zabbix server里添加主机
  打开zabbix 在浏览器中
  Configuration-->Hosts-->Create host
  Host name : web-server
  Groups In groups : Linux servers
  Groups In groups
  IP address:172.16.10.1
  好了 我们切换到Templates选项卡里
  Link new templates 输入linux 选择Template OS Linux
  然后点击save
  

  至此agentd端监控就完成了
  




页: [1]
查看完整版本: linux系统监控之zabbix agentd安装