VMware Cloud Community
fdghdsfhr
Contributor
Contributor

SNMP Trap recovery (vCenter 5.1.0)

Hi,

I am currently setting up Nagios and the ablility to receive snmp traps from devices in our network.

While trying to get things working for one of our vCenters I ran into an issue regarding the recovery of the alarms. Our vCenter uses one single OID for raising the trap and for trap recovery.

If you for example take the default Interface MIB (MIB: IF-MIB) there is a seperate OID for raising the trap and one for recovery.

EVENT linkDown .1.3.6.1.6.3.1.1.5.3 "Status Events" Critical

EVENT linkUp .1.3.6.1.6.3.1.1.5.4 "Status Events" Normal

This way it is easy to recover the check state in nagios.

How can I recover the trap  for a vCenter alert? There is no variable in the trap that can be used to distinquish a trap raise form a recovery.

2016-06-06 12:34:14 localhost [127.0.0.1] (via UDP: [192.168.x.x]:33653->[192.168.x.x]:162) TRAP, SNMP v1, community vmware

.1.3.6.1.4.1.6876.4.3 Enterprise Specific Trap (203) Uptime: 437 days, 23:12:10.79

.1.3.6.1.4.1.6876.4.3.308.0 = INTEGER: 2       

.1.3.6.1.4.1.6876.4.3.304.0 = STRING: "Green"  

.1.3.6.1.4.1.6876.4.3.305.0 = STRING: "Yellow" 

.1.3.6.1.4.1.6876.4.3.306.0 = STRING: "Test_alarm - Metric CPU Usage = 12%"       

.1.3.6.1.4.1.6876.4.3.307.0 = STRING: "192.168.x.x"

2016-06-06 12:34:33 localhost [127.0.0.1] (via UDP: [192.168.x.x]:47636->[192.168.x.x]:162) TRAP, SNMP v1, community vmware

.1.3.6.1.4.1.6876.4.3 Enterprise Specific Trap (203) Uptime: 437 days, 23:12:28.96

.1.3.6.1.4.1.6876.4.3.308.0 = INTEGER: 2       

.1.3.6.1.4.1.6876.4.3.304.0 = STRING: "Yellow" 

.1.3.6.1.4.1.6876.4.3.305.0 = STRING: "Green"  

.1.3.6.1.4.1.6876.4.3.306.0 = STRING: "Test_alarm - Metric CPU Usage = 5%"

.1.3.6.1.4.1.6876.4.3.307.0 = STRING: "192.168.x.x"

Does somebody know how this can be achieved?

Kinds regards.

Patrick Spruit

Reply
0 Kudos
0 Replies