Well, evt._action = 'drop' isn't going to put the event in history, but 
delete it entirely.
See:
http://community.zenoss.org/trac-zenpacks/wiki/CommunityFAQGeneral?version=98#Whatre-mappingoptionsarethereforeventsinEventTransforms
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University



jbwjbw wrote, On 9/10/2009 8:19 AM:
> jbaird wrote:
>> Justin,
>>
>> I think you want to do something like:
>>
>>
>> Code:
>>
>> theTrapDescription = getattr(evt, 'trapDescription', 'Unknown')
>> evt.summary = 'Description: %s' % (theTrapDescription)
>>
>>
>>
>>
>> Josh
> 
> 
> Josh,
> 
> I'm trying to build on this for different event transform, any guidance? 
> 
> I have two fiber channel switches that sends a trap because a system 
> connected to tem reboots nightly after it's backup is complete. I only want 
> to do this when swFCPortIndex equals 12 from the snmp trap details for two 
> specific swtiches. I'd like to change the event to blue and move it to the 
> history. I need to key off a specific value in the snmp details.
> 
> 
> Code:
> 
> theswFCPortIndex = getattr(evt, 'swFCPortIndex', 'Unknown')
> 
> if (evt.device == 'mmc-sansw1.domain.dom' or evt.device == 
> 'mmc-sansw2.domain.dom')  and theswFCPortIndex == '12' :
>   evt.severity = 1
>   evt._action = 'drop'
> 
> 
> 
> 
> This code is not quite right, and I figured it might not be. Any chance 
> someone can let me know what I'm doing wrong?
> 
> Thanks!!
> 
> - Justin
> 
> 
> 
> 
> -------------------- m2f --------------------
> 
> Read this topic online here:
> http://forums.zenoss.com/viewtopic.php?p=39130#39130
> 
> -------------------- m2f --------------------
> 
> 
> 
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to