zabbix监控系统客户端安装
zabbix监控系统客户端安装
下载
http://www.zabbix.com/downloads/2.0.3/zabbix_agents_2.0.3.linux2_6.i386.tar.gz
http://www.zabbix.com/documentation/2.0/manual/installation
安装
1)创建用户
groupadd zabbix
useradd -g zabbix zabbix
2)解压即可
tar -zxvf zabbix_agents_2.0.3.linux2_6.i386.tar.gz -C /usr/local/zabbix_agent
3)安装服务
cat >>/etc/services<<EOF
zabbix-agent 10050/tcp Zabbix Agent
zabbix-agent 10050/udp Zabbix Agent
zabbix-trapper 10051/tcp Zabbix Trapper
zabbix-trapper 10051/udp Zabbix Trapper
EOF
4)修改配置文件
vim /usr/local/zabbix_agent/etc/zabbix_agent.conf
修改Zabbix server的ip
Server=192.168.10.197 #server端IP地址,请修改
5)启动
/usr/local/agent/sbin/zabbix_agentd -c /usr/local/agent/etc/zabbix_agentd.conf
Echo "/usr/local/agent/sbin/zabbix_agentd -c /usr/local/agent/etc/zabbix_agentd.conf" >>/etc/tc.local
6)添加到系统目录
ln -s /usr/local/zabbix_agent/sbin/* /usr/local/sbin/
ln -s /usr/local/zabbix_agent/bin/* /usr/local/bin/
7)测试,下面的命令需要在server端执行,其中192.168.10.199是agent的ip
#/usr/local/zabbix/bin/zabbix_get -s192.168.10.199 -p10050 -k"system.uptime"目录 返回
首页