To search ClassKey for a substring located anywhere with the total string use 
this:

Code:
evt.ClassKey.find('1.3.6.1.4.1.311.1.13') >= 0




To see if ClassKey starts with a specific string use this:

Code:
evt.ClassKey.startswith('1.3.6.1.4.1.311.1.13')





jeopardyracing wrote:
> I need a python expression for "contains". What I have tried to do is to go 
> to the event container I am targeting and to create a new rule. In the Rule 
> field I put
> 
> evt.ClassKey <> '1.3.6.1.4.1.311.1.13'
> 
> but that didn't snag incoming events from Windows. My objective was to snag 
> any fule with a class key that contained those figures (the Windows events 
> have those numerals leading their OID, then other numerals follow that are 
> different for each event.). Using "<>" was a total guess - what synax should 
> I have used for "contains"?
[/code]




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=24575#24575

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to