HP SNMP Trap 每 10 秒向 NIC 发出一次信号

HP SNMP Trap 每 10 秒向 NIC 发出一次信号

我正在尝试在我的 HP DL160 G6(Xenserver)上设置 SNMP 陷阱,以便在服务器出现问题时通知我。

遵循以下建议此 serverfault 帖子,我安装了 HP SNMP 代理,并配置了它,cma.conf以便每当生成 SNMP 陷阱时都给我发送电子邮件。为了测试它,我拔掉了辅助 NIC。

我的问题是,我不是只得到一个表明 NIC 断开或重新连接的陷阱,而是每 10 秒生成一次陷阱来表明链接已关闭或已打开。

我还安装了 HP 系统管理 Web 界面,但似乎找不到如何配置 NIC 代理以停止每 10 秒发送一次陷阱并且仅在状态改变时发送陷阱。

这可能吗?

启用 SNMP 代理(cmanicd)后,我得到以下内容/var/log/messages

Feb 28 16:51:01 xenserver-opvorsfu logger: 192.168.0.152: Enterprise Specific Trap (18012)
Feb 28 16:51:01 xenserver-opvorsfu logger:  Uptime: 4:32:23.51
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-MIB::sysName.0 = STRING: xenserver-opvorsfu
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.11.2.11.1.0 = INTEGER: 0
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.5.2 = INTEGER: 0
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.10.2 = INTEGER: 2
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.2.2.4.17.0 = STRING: "Not Available"
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.14.2 = INTEGER: 4
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.1.2.13.1.1.5.5.0 = STRING: "HP NC362i Integrated DP Gigabit Server Adapter"
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.32.2 = ""
Feb 28 16:51:01 xenserver-opvorsfu logger: IP-MIB::ipAdEntAddr.0.0.0.0 = IpAddress: 0.0.0.0
Feb 28 16:51:01 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.4.1.1.6.2 = STRING: "N/A"
Feb 28 16:51:12 xenserver-opvorsfu cmanicd: Entering iml_log_link_down(slot: 0, port: 2) 
Feb 28 16:51:12 xenserver-opvorsfu cmanicd: Entering log_iml_event(slot: 0, port: 2, code: (Down,2)) 
Feb 28 16:51:12 xenserver-opvorsfu cmanicd: Entering get_event_id(slot: 0, port: 2 
Feb 28 16:51:12 xenserver-opvorsfu cmanicd: No Existing event id found for the slot and port. 
Feb 28 16:51:12 xenserver-opvorsfu cmanicd: an IML entry for this slot and port does not exist, so add one. 
Feb 28 16:51:12 xenserver-opvorsfu cmanicd: cmanic: could not log IML event, retval = 4 errno = 0, logevt.c,774  
Feb 28 16:51:12 xenserver-opvorsfu logger: Feb 28 16:51:01 xenserver-opvorsfu logger: Feb 28 16:50:51 xenserver-opvorsfu logger: Feb 28 16:50:40 xenserver-o
pvorsfu logger: Feb 28 16:50:40 xenserver-opvorsfu logger: Feb 28 16:50:39 xenserver-opvorsfu logger: Feb 28 16:50:29 xenserver-opvorsfu logger: Feb 28 16:5
0:19 xenserver-opvorsfu logger: Feb 28 16:50:08 xenserver-opvorsfu logger: Feb 28 16:49:58 xenserver-opvorsfu logger: Feb 28 16:49:57 xenserver-opvorsfu log
ger: Feb 28 16:49:54 xenserver-opvorsfu kernel: [16281.101268] igb: eth1 NIC Link is Down
Feb 28 16:51:12 xenserver-opvorsfu logger: 192.168.0.152: Enterprise Specific Trap (18012)
Feb 28 16:51:12 xenserver-opvorsfu logger:  Uptime: 4:32:33.98
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-MIB::sysName.0 = STRING: xenserver-opvorsfu
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.11.2.11.1.0 = INTEGER: 0
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.5.2 = INTEGER: 0
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.10.2 = INTEGER: 2
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.2.2.4.17.0 = STRING: "Not Available"
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.14.2 = INTEGER: 4
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.1.2.13.1.1.5.5.0 = STRING: "HP NC362i Integrated DP Gigabit Server Adapter"
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.32.2 = ""
Feb 28 16:51:12 xenserver-opvorsfu logger: IP-MIB::ipAdEntAddr.0.0.0.0 = IpAddress: 0.0.0.0
Feb 28 16:51:12 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.4.1.1.6.2 = STRING: "N/A"
Feb 28 16:51:15 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:52919 
Feb 28 16:51:15 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:32864 
Feb 28 16:51:15 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:51237 
Feb 28 16:51:22 xenserver-opvorsfu cmanicd: Entering iml_log_link_down(slot: 0, port: 2) 
Feb 28 16:51:22 xenserver-opvorsfu cmanicd: Entering log_iml_event(slot: 0, port: 2, code: (Down,2)) 
Feb 28 16:51:22 xenserver-opvorsfu cmanicd: Entering get_event_id(slot: 0, port: 2 
Feb 28 16:51:22 xenserver-opvorsfu cmanicd: No Existing event id found for the slot and port. 
Feb 28 16:51:22 xenserver-opvorsfu cmanicd: an IML entry for this slot and port does not exist, so add one. 
Feb 28 16:51:22 xenserver-opvorsfu cmanicd: cmanic: could not log IML event, retval = 4 errno = 0, logevt.c,774  
Feb 28 16:51:22 xenserver-opvorsfu logger: Feb 28 16:51:12 xenserver-opvorsfu logger: Feb 28 16:51:01 xenserver-opvorsfu logger: Feb 28 16:50:51 xenserver-opvorsfu logger: Feb 28 16:50:40 xenserver-opvorsfu logger: Feb 28 16:50:40 xenserver-opvorsfu logger: Feb 28 16:50:39 xenserver-opvorsfu logger: Feb 28 16:50:29 xenserver-opvorsfu logger: Feb 28 16:50:19 xenserver-opvorsfu logger: Feb 28 16:50:08 xenserver-opvorsfu logger: Feb 28 16:49:58 xenserver-opvorsfu logger: Feb 28 16:49:57 xenserver-opvorsfu logger: Feb 28 16:49:54 xenserver-opvorsfu kernel: [16281.101268] igb: eth1 NIC Link is Down
Feb 28 16:51:22 xenserver-opvorsfu logger: 192.168.0.152: Enterprise Specific Trap (18012)
Feb 28 16:51:22 xenserver-opvorsfu logger:  Uptime: 4:32:44.43
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-MIB::sysName.0 = STRING: xenserver-opvorsfu
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.11.2.11.1.0 = INTEGER: 0
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.5.2 = INTEGER: 0
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.10.2 = INTEGER: 2
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.2.2.4.17.0 = STRING: "Not Available"
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.14.2 = INTEGER: 4
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.1.2.13.1.1.5.5.0 = STRING: "HP NC362i Integrated DP Gigabit Server Adapter"
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.3.1.1.32.2 = ""
Feb 28 16:51:22 xenserver-opvorsfu logger: IP-MIB::ipAdEntAddr.0.0.0.0 = IpAddress: 0.0.0.0
Feb 28 16:51:22 xenserver-opvorsfu logger: SNMPv2-SMI::enterprises.232.18.2.4.1.1.6.2 = STRING: "N/A"
Feb 28 16:51:30 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:41836 
Feb 28 16:51:30 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:50204 
Feb 28 16:51:30 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:47990 
Feb 28 16:51:32 xenserver-opvorsfu cmanicd: Entering iml_log_link_down(slot: 0, port: 2) 

禁用cmanicd后,我得到以下信息/var/log/messages

Feb 28 16:44:28 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:55759 
Feb 28 16:44:28 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:33561 
Feb 28 16:44:28 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:48321 
Feb 28 16:44:32 xenserver-opvorsfu kernel: [15959.771627] igb: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
Feb 28 16:44:43 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:52043 
Feb 28 16:44:43 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:52082 
Feb 28 16:44:43 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:46917 
Feb 28 16:44:58 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:42179 
Feb 28 16:44:58 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:56542 
Feb 28 16:44:58 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:52481 
Feb 28 16:45:09 xenserver-opvorsfu kernel: [15996.671268] igb: eth1 NIC Link is Down
Feb 28 16:45:14 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:58277 
Feb 28 16:45:14 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:57163 
Feb 28 16:45:14 xenserver-opvorsfu snmpd[19168]: Received SNMP packet(s) from UDP: [127.0.0.1]:58464 

相关内容