Thanks for the info Matt.
I've pasted the code but is still doesn't work at all.
I did add an extra variable to debug.
Code:
index = getattr(evt, 'ifIndex', 0)
descr = getattr(evt, 'ifDescr', 'Unknown Interface')
test = ' NO RESULT'
evt.component = descr
if device:
description = ''
test = ' IF device was TRUE'
for iface in device.os.interfaces():
if index and iface.ifindex == index:
descr = iface.description
test = ' index was TRUE'
elif descr and iface.name == descr:
descr = iface.description
test = ' descr was TRUE'
evt.summary = 'Link down on port with description %s' % (descr + test)
I have a device called 'rtr-test' with an inteface 'FastEthernet0/1', it has a
description 'switch01'
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=33182#33182
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users