I'd do it slightly differently using an EventCondition to check the model name before trying to create an event, something like:
### If model name starts with 'SPEC' generate a new event and pass all variables 0x00220001 R CA.EventCondition, "(regexp({a 0x1006e}, {S \"^SPEC.*\"}))", "0xfff00004 -:-" ### Event handler 0xfff00004 P " \ CreateEventWithVariables({C CURRENT_MODEL},{H 0xfff00005}, \ SetEventVariable(GetEventVariableList(), {H 0x12b4c}, {S \"Create the alarm title you want...\"}) \ )" ### Raise an alarm 0xfff00005 E 20 A 3,0xfff00004,U That way, you don't need to do any further processing if the model name does not start with 'SPEC'. Also, I'd usually use SetVariable, GetRegexp, etc to generate the alarm title from the values of the trap varbinds before calling CreateEventWithVariables, then use that value in the SetEventVariable function. Hope that helps. Craig Porter, Enterprise Systems Management - Availability & Performance Monitoring Marsh & McLennan Companies Global Technology Infrastructure (MGTI) | Centralized Operations Sackville House 1.6, 143-149 Fenchurch Street, London EC3M 6BN, Great Britain +44 (0)20 7178 4827 | Mobile +44 (0)7585 803 093 | craig.por...@mmc.com<mailto:craig.por...@marsh.com> www.mmc.com<http://www.mmc.com/> From: Calvin Lane [mailto:calvin.l...@gmail.com] Sent: 14 April 2014 14:56 To: spectrum Subject: [spectrum] Event procedure and rules assistance needed Hello everyone, I've created some custom events based on a link down trap. Examples 1 and 2 will create either event 0xfff00004 or 0xfff00005 when the model name begins with SPEC, but there are no variables in the event. I'd like to see the event variables from the original event (0x00220001) in either of the new events (0xfff0004 or 0xfff0005). Is there a different event procedure I should be using? 1) 0x00220001 P "CreateEventWithVariables( { C CURRENT_MODEL }, { H 0xfff00004 } )" 0xfff00004 E 20 R CA.EventCondition, "(regexp({a 0x1006e}, {S \"^SPEC\"}))" , "0xfff00005 -:-" 0xfff00005 E 20 A 3,0xfff00004,U 2) 0x00220001 P "CreateEvent( { C CURRENT_MODEL }, { H 0xfff00004 } )" 0xfff00004 E 20 R CA.EventCondition, "(regexp({a 0x1006e}, {S \"^SPEC\"}))" , "0xfff00005 -:-" 0xfff00005 E 20 A 3,0xfff00004,U Calvin * --To unsubscribe from spectrum, send email to lists...@unc.edu<mailto:lists...@unc.edu> with the body: unsubscribe spectrum craig.por...@marsh.com<mailto:craig.por...@marsh.com> ________________________________ Marsh Ltd. Registered in England and Wales Number: 1507274 Registered office 1 Tower Place West, Tower Place, London, EC3R 5BU. Marsh Ltd is authorised and regulated by the Financial Conduct Authority. This message and any attachments are confidential. If you have received this message in error please delete it from your system. If you require any assistance please notify the sender. Thank you. --- To unsubscribe from spectrum, send email to lists...@unc.edu with the body: unsubscribe spectrum arch...@mail-archive.com