Zabbix监控ovh托管主机不出数据的解决办法

2023年 7月 15日 65.6k 0

首先挂os linux模板后发现网卡都是0远程get发现是0

[root@iZ626l9a5x1Z ~]# zabbix_get -s 149.2.120.34 -k net.if.out[eth0]
0

在本监控主机上发现当前的网卡,确认正常!

[root@ns3723989 ~]# zabbix_agentd -t net.if.discovery
net.if.discovery                              [s|{"data":[{"{#IFNAME}":"teql0"},{"{#IFNAME}":"eth0"},{"{#IFNAME}":"docker0"},{"{#IFNAME}":"eth1"},{"{#IFNAME}":"dummy0"},{"{#IFNAME}":"bond0"},{"{#IFNAME}":"ifb0"},{"{#IFNAME}":"ip6tnl0"},{"{#IFNAME}":"ifb1"},{"{#IFNAME}":"sit0"},{"{#IFNAME}":"lo"},{"{#IFNAME}":"tunl0"}]}]
[root@ns3723989 ~]# 

获取值,也正常

[root@ns3723989 ~]# zabbix_agentd -t net.if.out[eth0]
net.if.out[eth0]                              [u|18019795877]
[root@ns3723989 ~]# zabbix_agentd -t net.if.in[eth0]
net.if.in[eth0]                               [u|2307011385657]

可参考:https://www.zabbix.com/documentation/3.2/manual/config/items/itemtypes/zabbix_agent重点参考这篇文字:http://neuro.me.uk/2009/09/20/revert-to-standard-ubuntu-kernel-on-ovh-or-kimsufi-servers/我们手动写个简单的key,如下图:key.png重启zabbix-agentd,在server端测试

激动人心的时刻来了,踏马的还是没数据

[root@iZ626l9a5x1Z ~]# zabbix_get -s 149.2.120.34 -k eth0_input
0
[root@iZ626l9a5x1Z ~]# zabbix_get -s 149.2.120.34 -k eth0_output
0
[root@iZ626l9a5x1Z ~]# 
[root@ns3723989 ~]# wget http://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.1/zabbix-3.2.1.tar.gz
[root@ns3723989 ~]# tar xf zabbix-3.2.1.tar.gz -C /usr/local/
[root@ns3723989 ~]# cd /usr/local/
[root@ns3723989 /usr/local/zabbix-3.2.1]# ./configure --prefix=/usr/local/zabbix --enable-agent
[root@ns3723989 /usr/local/zabbix-3.2.1]# make && make install
[root@ns3723989 /usr/local/zabbix-3.2.1]#cp /usr/local/zabbix-3.2.1/misc/init.d/fedora/core5/zabbix_agentd /etc/init.d/
[root@ns3723989 /usr/local/zabbix-3.2.1]# vim /etc/init.d/zabbix_agentd  修改路径
/[root@ns3723989 /usr/local/zabbix-3.2.1]# etc/init.d/zabbix_agentd restart
[root@ns3723989 /usr/local/zabbix/etc]# tail -f /tmp/zabbix_agentd.log 
 17730:20161103:140314.375 IPv6 support:           NO
 17730:20161103:140314.375 TLS support:            NO
 17730:20161103:140314.375 **************************
 17730:20161103:140314.375 using configuration file: /usr/local/zabbix/etc/zabbix_agentd.conf
 17730:2016103:140314.375 agent #0 started [main process]
 17732:20161103:140314.375 agent #1 started [collector]
 17733:201613:140314.376 agent #2 started [listener #1]
 17734:201603:140314.376 agent #3 started [listener #2]
 17736:2016103:140314.376 agent #5 started [active checks #1]
 17735:201113:140314.376 agent #4 started [listener #3]

然而,这样并没有解决问题,在看1.png2.png3.png4.pngok

相关文章

对接alertmanager创建钉钉卡片(1)
手把手教你搭建OpenFalcon监控系统
无需任何魔法即可使用 Ansible 的神奇变量“hostvars”
openobseve HA本地单集群模式
基于k8s上loggie/vector/openobserve日志收集
openobseve单节点和查询语法

发布评论