I'm trying to setup SNMP traps on my HP DL160 G6 (Xenserver) to notify me whenever I have issues with the server.
Following suggestions from this serverfault post, I've installed the HP SNMP agents and configured my cma.conf
to email me whenever I have an SNMP trap generated. To test it out, I unplugged a secondary NIC.
My problem is that instead of just getting a single trap indicating that the NIC was disconnected or reconnected, I get traps generated every 10secs indicating that the link is down or up.
I also installed the HP System Management web interface, but can't seem to find how to configure the NIC agent to stop sending traps every 10secs and only trap on state change.
Is this possible?
With the SNMP agent (cmanicd) enabled, I get the following in /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)
With cmanicd
disabled, I get the following in /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
0 Answers