1.查看客户端进程
ps -ef |grep zabbix_agentd|grep -i zabbix_agentd | grep -v grep
[root@LGJF-ZYC5-MMSC-SRV11 ~]# ps -ef |grep zabbix_agentd|grep -i zabbix_agentd | grep -v grep
zabbix 2180 1 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd -c /opt/aspire/product/zabbix/conf/zabbix_agentd.conf
zabbix 2183 2180 0 Jul19 ? 00:00:40 /opt/aspire/product/zabbix/sbin/zabbix_agentd: collector [idle 1 sec]
zabbix 2184 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #1 [waiting for connection]
zabbix 2186 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #2 [waiting for connection]
zabbix 2187 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #3 [waiting for connection]
zabbix 2188 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #4 [waiting for connection]
zabbix 2189 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #5 [waiting for connection]
zabbix 2190 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #6 [waiting for connection]
zabbix 2191 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #7 [waiting for connection]
zabbix 2192 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #8 [waiting for connection]
zabbix 2193 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #9 [waiting for connection]
zabbix 2194 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #10 [waiting for connection]
zabbix 2195 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #11 [waiting for connection]
zabbix 2196 2180 0 Jul19 ? 00:00:00 /opt/aspire/product/zabbix/sbin/zabbix_agentd: listener #12 [waiting for connection]
zabbix 2197 2180 0 Jul19 ? 00:00:07 /opt/aspire/product/zabbix/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
2.找出进程,杀死进程
ps -ef |grep zabbix_agentd|grep -i zabbix_agentd | grep -v grep | awk '{print $2}' |xargs kill -9
3.修改配置文件
配置文件在 /opt/aspire/product/zabbix/conf/zabbix_agentd.conf
122 ServerActive=10.3.0.1 这个是监控的代理机ip
141 #HostnameItem=system.hostname
142 Hostname=10.3.14.153 这个是需要监控的ip
4.指向配置文件,重启zabbix客户端重启服务
/opt/aspire/product/zabbix/sbin/zabbix_agentd -c /opt/aspire/product/zabbix/conf/zabbix_agentd.conf
5.查看监控日志信息
tail /opt/aspire/product/zabbix/log/zabbix_agentd.log
[root@LGJF-ZYC5-MMSC-SRV10 conf]# tail /opt/aspire/product/zabbix/log/zabbix_agentd.log
6866:20190722:110919.177 agent #1 started [listener #1]
6876:20190722:110919.178 agent #10 started [listener #10]
6877:20190722:110919.178 agent #11 started [listener #11]
6878:20190722:110919.178 agent #12 started [listener #12]
6874:20190722:110919.178 agent #8 started [listener #8]
6879:20190722:110919.178 agent #13 started [active checks #1]
/etc/host.conf: line 1: bad command `nospoof on'
6879:20190722:110919.294 active check "fc_total" is not supported
6879:20190722:110919.294 active check "fc_used" is not supported
6879:20190722:110920.300 active check "monitordiskalert" is not supported
ps -ef |grep zabbix_agentd|grep -i zabbix_agentd | grep -v grep | awk '{print $2}' |xargs kill -9
sleep 0.5
/opt/aspire/product/zabbix/sbin/zabbix_agentd -c /opt/aspire/product/zabbix/conf/zabbix_agentd.conf
sleep 0.5
tail /opt/aspire/product/zabbix/log/zabbix_agentd.log
cat /opt/aspire/product/zabbix/conf/zabbix_agentd.conf | grep ActiveServer=