I have an Aruba wireless controller which sends traps when an access point goes down, unfortunately it sends 4 of the same trap (which I've verified by sniffing the traffic).  Since one of the actions in my Event Policy is to send an email, I get 4 of the same email when this occurrs.  The Alarm Browser window shows a count of 4, so I know my Alarm Key is okay.  Is there a way to limit the number of emails to 1?  Would I need to use situations?  Is the Alarm Count available via a NXSL script for use in an Event Filtering script?
Thanks!
			
			
			
				Hi!
Yes, you should use situations for preventing duplicate emails. Depending on if you have paired event for access point coming up, you can either set situation's attribute to true when you process first down trap, ignore all other down traps if it's set, and clear it on access port up trap, or you can store current time in situation's attribute, and ignore all next events withing some short time interval.
Best regards,
Victor
			
			
			
				Thanks for the reply, but I have a couple more questions:
The AP name is sent in parameter 2, which I successfully decode, parse and include in my notification emails.  How do I go about creating the Situation?  I thought about having a situation called "APStatusTraps", but would the AP name be an instance or an attribute of the situation?  Can I use %2 as the macro in the creation of the instance/attribute?
			
			
			
				You should have AP name as an instance. You can create some attribute, like isDown, and set it to true on down trap and to false on up trap. Then in filtering script for down trap you can check if this attribute already set to true, and then ignore the event. And yes, you can use %2 and other macros as instance and/or attribute value.
Best regards,
Victor
			
			
			
				That worked perfectly!  Thanks!  Now, one more question:
Is it possible to access the parameters in the SNMP traps via the $event object?  For example, the AP name is passed as parameter 2, which I've configured as "apLocation" in the Description field in the Trap Parameter Mapping dialog box.  Is it possible to get the value via something like $event->apLocation or GetEventParameter($event,"apLocation")?
BTW: I'm migrating from OpenNMS and I love the power and flexibility of NetXMS while at the same time being easy to configure!  
			
			
			
				You can access trap-originated event's parameters in script, but only by index, like this:
$event->parameters[2]
Best regards,
Victor