Based on the snmptrap syntax you have provided, the value of { U 2 } variable is not there, which also causes problem to the event procedure.
The nHostname.nHostEventIndex is the { U 2 } variable. The nSvcDesc.nSvcEventIndex is the { U 5 } variable.
I have compiled the NAGIOS-NOTIFY-MIB file into Spectrum and here what I got:
This is the Event Message:
A "nSvcEvent" event has occurred, from {t} device, named {m}.
The SNMP trap that is generated as a result of an event with the service in Nagios.
nHostname = {S 1}
nHostname.nHostEventIndex = {o 2}
nHostStateID = {T nHostStateID 3}
nSvcDesc = {S 4}
nSvcDesc.nSvcEventIndex = {o 5}
nSvcStateID = {T nSvcStateID 6}
nSvcAttempt = {I 7}
nSvcDurationSec = {I 8}
nSvcGroupName = {S 9}
nSvcLastCheck = {I 10}
nSvcLastChange = {I 11}
nSvcOutput = {S 12}
This is the $SPECROOT/custom/Events/AlertMap file:
1.3.6.1.4.1.20006.1.6.7 0xfff00000 1.3.6.1.4.1.20006.1.1.1.2(1,2)\
# nHostStateID
1.3.6.1.4.1.20006.1.1.1.4(3,0)\
# nSvcDesc
1.3.6.1.4.1.20006.1.3.1.6(4,5)\
# nSvcStateID
1.3.6.1.4.1.20006.1.3.1.7(6,0)\
# nSvcAttempt
1.3.6.1.4.1.20006.1.3.1.8(7,0)\
# nSvcDurationSec
1.3.6.1.4.1.20006.1.3.1.9(8,0)\
# nSvcGroupName
1.3.6.1.4.1.20006.1.3.1.10(9,0)\
# nSvcLastCheck
1.3.6.1.4.1.20006.1.3.1.11(10,0)\
# nSvcLastChange
1.3.6.1.4.1.20006.1.3.1.12(11,0)\
# nSvcOutput
1.3.6.1.4.1.20006.1.3.1.17(12,0)
Here an example when the nHostname.nHostEventIndex and nSvcDesc.nSvcEventIndex variables are missing.
Here an example when the nHostname.nHostEventIndex and nSvcDesc.nSvcEventIndex variables are available.