This worked for me. I had to enclose the numbers with quotes.

Code:
x = getattr(evt, "ospfNbrState")
ip = getattr(evt, "ospfNbrIpAddr")


if x == "8" :
   evt.severity = 0
   evt.summary = "OSPF Back to full"
elif x == "1" :
   evt.summary = "OSPF Neighbor Down : " + ip
elif x == "2" :
   evt.summary = "OSPF Neighbor " + ip + " : attempt"
elif x == "3" :
   evt.summary = "OSPF Neighbor " + ip + " : init"
elif x == "4" :
   evt.summary = "OSPF Neighbor " + ip + " : twoWay"
elif x == "5" :
   evt.summary = "OSPF Neighbor " + ip + " : exchangeStart"
elif x == "6" :
   evt.summary = "OSPF Neighbor " + ip + " : exchange"
elif x == "7" :
   evt.summary = "OSPF Neighbor " + ip + " : loading" 
else:
   evt.summary = "Current X Setting is " + x






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

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

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



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

Reply via email to