Kris, I couldn't test this, but should work fine. The only possible issue is
find('trunk') - the 'trunk' is a string literal and has to match EXACTLY the
text of your trap message. trunk != Trunk != TRUNK. You may need to change what
is between the quotes to match your trap.
BTW - working on my CCNA right now. Any suggestions or website links would be
helpful. Send me a private message by clicking the "profile" button, then
"private message".
Hope this helps.
linkdown:
Code:
index = getattr(evt, 'ifIndex', 0)
descr = getattr(evt, 'ifDescr', 'Unknown Interface')
if descr.find('trunk') != -1:
evt.severity = 5
evt.component = descr
if device:
description = ''
for iface in device.os.interfaces():
if index and iface.ifindex == index:
descr = iface.description
elif descr and iface.name == descr:
descr = iface.description
evt.summary = 'Link down on %s' % (descr)
else:
evt._action = 'drop'
linkup:
Code:
index = getattr(evt, 'ifIndex', 0)
descr = getattr(evt, 'ifDescr', 'Unknown Interface')
if descr.find('trunk') != -1:
evt.severity = 5
evt.component = descr
if device:
description = ''
for iface in device.os.interfaces():
if index and iface.ifindex == index:
descr = iface.description
elif descr and iface.name == descr:
descr = iface.description
evt.summary = 'Link up on %s' % (descr)
else:
evt._action = 'drop'
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=38616#38616
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users