cacti故障一例

问题背景:

某主机snmp服务正常,但是添加主机的时候死活都要报错。

解决过程:

问题主机的IP地址为 192.16.1.23

Cacti服务器IP地址为 10.123.155.22

检查192.16.1.23主机的snmp服务:

# service snmpd status
Checking for service snmpd: running

这个主机snmp服务配置没有问题。

cacti服务器为10.1.20.22,执行snmpwalk命令,测试取数据

# snmpwalk -v 2c -c public 192.16.1.23
Timeout: No Response from 192.16.1.23
You have new mail in /var/spool/mail/root

这个说明snmp数据取不到。

ping 192.16.1.23
PING 192.16.1.23 (192.16.1.23) 56(84) bytes of data.
--- 192.16.1.23 ping statistics ---
61 packets transmitted, 0 received, 100% packet loss, time 60151ms

说明网络都不通,我晕。

测试另外一个与问题主机在同一个网段的服务器;

snmpwalk -v 2c -c public 192.16.1.223
SNMPv2-MIB::sysDescr.0 = STRING: Linux DCB2B-DTNODE2 2.6.16.60-0.54.5-smp #1 SMP Fri Sep 4 01:28:03 UTC 2009 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (801285) 2:13:32.85
SNMPv2-MIB::sysContact.0 = STRING: Sysadmin (
root@localhost)
SNMPv2-MIB::sysName.0 = STRING: DCB2B-DTNODE2
SNMPv2-MIB::sysLocation.0 = STRING: Server Room
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (50) 0:00:00.50
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance

... ...(此处省去很多字)

可以提取到很多snmp数据。

在检查一下本机网络配置;

ifconfig -a | moreeth0 Link encap:Ethernet HWaddr 9C:8E:99:21:16:84
inet addr:192.16.1.23
Bcast:192.16.1.255 Mask:255.255.255.0
inet6 addr: fe80::9e8e:99ff:fe21:1684/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19826642723 errors:0 dropped:0 overruns:0 frame:0
TX packets:21823868639 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3346657218395 (3191621.0 Mb) TX bytes:11155401433937 (10605241.2 Mb)
Interrupt:65

eth1 Link encap:Ethernet HWaddr 9C:8E:99:21:16:85
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:69

eth2 Link encap:Ethernet HWaddr 9C:8E:99:21:16:86
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:73

eth3 Link encap:Ethernet HWaddr 9C:8E:99:21:16:87
inet addr:10.123.155.228
Bcast:10.1.155.255 Mask:255.255.255.0
inet6 addr: fe80::9e8e:99ff:fe21:1687/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3262690252 errors:0 dropped:0 overruns:0 frame:0
TX packets:571051534 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:226945294524 (216431.8 Mb) TX bytes:7904524300966 (7538341.8 Mb)
Interrupt:77

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4948662 errors:0 dropped:0 overruns:0 frame:0
TX packets:4948662 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:374984240 (357.6 Mb) TX bytes:374984240 (357.6 Mb)

说明目前有两块网卡,我找到该系统的管理员了解到,192段的网络用于映射到外网,155段的网络是用于数据备份。我要监控该主机,只需要添加155段地址即可实现。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值