zabbix4.0版本(二)

1. 监控一台新主机zabbix-agent

1.1安装zabbixyum源

[root@ecs-t6-medium-2-linux-20191020204558 ~]# yum -y install zabbix-agent
[root@ecs-t6-medium-2-linux-20191020204558 ~]# rpm -qa|grep zabbix
zabbix-release-4.0-1.el7.noarch        
zabbix-agent-4.0.14-1.el7.x86_64  
[root@zabbix-agent ~]# vim /etc/zabbix/zabbix_agentd.conf
[root@zabbix-agent ~]# cat /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=139.9.186.7
ServerActive=139.9.186.7 
Hostname=Zabbix server
Include=/etc/zabbix/zabbix_agent.d/*.conf 
 

1.2 Zabbix-agent 启动

[root@zabbix-agent zabbix]# systemctl restart zabbix-agent 
启动报错:
zabbix-agent.service never wrote its PID file. Failing.
[root@zabbix-agent zabbix]# chown zabbix.zabbix /var/log/zabbix/zabbix_agentd.log 

1.3 服务端获取客户端值

[root@zabbix-server ~]# yum -y install zabbix-get
[root@zabbix-server ~]#  zabbix_get -s 122.112.164.83 -k agent.hostname
zabbix-agent 

2.Web添加监控主机 

 

posted @ 2019-11-05 20:29  地铁昌平线  阅读(150)  评论(0编辑  收藏  举报