标签:
CentOS 7:
[root@localhost /]# rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
[root@localhost /]# yum -y install vim zabbix-agent
[root@localhost /]# vim /etc/zabbix/zabbix_agentd.conf
修改如下条目:
Server=172.16.1.186 ServerActive=172.16.1.186 Hostname=L-172.16.1.200
在尾部添加如下代码(统计连接数):
UserParameter=connection.tcp,ss -nat|grep ESTABLISHED|wc -l
查看服务状态:
[root@yqtrack03 /]# systemctl list-unit-files | grep zabbix-agent
添加到启动项:
[root@yqtrack03 /]# systemctl enable zabbix-agent.service
启动服务:
[root@localhost /]# systemctl start zabbix-agent.service
查看端口运行状况:
[root@yqtrack03 /]# ss -antup | grep zabbix_agent
标签:
原文地址:http://www.cnblogs.com/configure/p/5833658.html