接入监控的流程和方法

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=
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

运维螺丝钉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值