zabbix常见报错cannot send list of active checks to []: host [Zabbix server] not found

1、看日志  

服务端:zabbix-server:  

460  killall zabbix_agentd  

461  ss -tunlp | grep zabbix  

462  zabbix_get -s 10.211.55.12 -k count.line.passwd  

463  cat /tmp/zabbix_server.log  

464  hostname  

465  ss -tunlp | grep zabbix  

466  cat /tmp/zabbix_server.log  

467  getenforce  

468  iptables -L -n

469   iptables -I INPUT -p tcp -m multiport --dports 10050:10051 -j ACCEPT  

470  service iptables save  

471  iptables -L -n  

472  zabbix_get -s 10.211.55.12 -k count.line.passwd  

473  cat /tmp/zabbix_server.log  

474  zabbix_get -s 10.211.55.12 -k count.line.passwd  

475  cat /tmp/zabbix_server.log

 

 

 

2、客户端:zabbix-c1

164  vim /etc/zabbix/zabbix_agentd.conf  

165  pkill -f zabbix  

166  ss -tunlp  

167  iptables -L -n  

168  service zabbix_agentd start  

169  vim /etc/zabbix/zabbix_agentd.conf  

170  service zabbix_agentd stop  

171  service zabbix_agentd start  

172  netstat -nplut |grep zabbix  

173  vim /etc/zabbix/zabbix_agentd.conf  

174  netstat -nplut |grep zabbix  

175  ss -tunlp  

176  ss -tunlp | grep zabbix  

177  cat /etc/networks  

178  cat /etc/hosts  

179  cat /usr/local/zabbix/etc/zabbix_agent.conf  

180  vim  /usr/local/zabbix/etc/zabbix_agent.conf  

181  find / -name zabbix_agentd.conf  

182  vim /usr/local/zabbix/etc/zabbix_agentd.conf  

183  cd /usr/local/etc/zabbix_agentd.conf.d/        

 

3、脚本路径

184  vim /usr/local/zabbix/etc/zabbix_agentd.conf    

# Include=/usr/local/etc/zabbix_agentd.userparams.conf

Include=/usr/local/etc/zabbix_agentd.conf.d/                        //把#去掉,监控项key路径

# Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf

 

        

185  cd /usr/local/etc/zabbix_agentd.conf.d/                               //cd /usr/local/etc/zabbix_agentd.conf.d/ 出错

186  mkdir /usr/local/etc/zabbix_agentd.conf.d/  

187  cd /usr/local/etc/zabbix_agentd.conf.d/  

188  vim count.line.passwd  

189  ls -ld count.line.passwd  

190  chmod 777 count.line.passwd            //权限

191  ls -ld count.line.passwd  

192  killall zabbix_agentd  

193  zabbix_agentd  

194  ifconfig  

195  vim count.line.passwd                //自定义key

196  killall zabbix_agentd  

197  zabbix_agentd

4、测试

[root@zabbix-server ~]# zabbix_get -s 10.211.55.12 -k count.line.passwd

40

到此ok

 

 

总结:zabbix出错原因

1、selinux  

2、iptables

3、端口 如:10050   10051    3306  等

4、ss -tunlp | grep zabbix 查询

5、find   /  -name    zabbix_agentd.conf  查询路径

6、一定记得重启服务与配置检查 如:hostname   ip   端口是否有错

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

乐于技术分享

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

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

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

打赏作者

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

抵扣说明:

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

余额充值