Thanks for the link Matt,

Since I'm a python illeterate I only got this far :

Code:

descr = getattr(evt, 'ifDescr', 'Unknown Interface')
interface = evt.component

if evt.summary.startswith('threshold of Operational State'):
    if evt.severity > 0:
        evt.summary = 'Link down on %s' %(descr)
    else:
        evt.summary =  'Link up on %s' %(descr)



It always returns : "Link down on Unknown Interface", but I'm sure there's a 
description.

I've looked up 'getattr' and It seems to get an attribure for an object and 
I've its not there it assigns 'Unknown interface'.

How does it know for which object it should get the discription ? What does evt 
mean ?




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

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

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



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

Reply via email to