cluther wrote: > On May 4, 2008, at 4:01 AM, shakespear wrote: > > > How can I access event details in Event mappings? > > > > e.g. > > > > EventDetail (sent with snmp trap) > > > > agentWorkInteger1 1 > > agentWorkObject UC4.yxyxyx.yxyxyx.yxyxy > > agentWorkString1 yxyxy > > agentWorkSysID UC4P > > community yxyxy > > > > This is the current Event Transformation: > > > > evt.summary = "UC4 Executor stopped" > > if evt.AgentWorkInteger1==1: evt.message="Mode: Primary" > > if evt.AgentWorkInteger1==3: evt.message="Mode: Normal" > > if evt.AgentWorkInteger1==4: evt.message="Mode: Communication" > > evt.message = evt.summary + " System/Server/Executor/Type: " + > > evt.AgentWorkObject + " " + evt.message > > > > What does work: > > > > The evt.summary gets set to "UC4 Executor stopped" > > > > What doesn't work: > > > > The evt.message stuff. > > > > It's likely that the evt.AgentWorkInteger1 is a string "1" and not an > integer. Try changing your conditionals to the following instead. > > if evt.AgentWorkInteger1 == "1": evt.message="Mode: Primary" > _______________________________________________ > zenoss-users mailing list > [email protected] > http://lists.zenoss.org/mailman/listinfo/zenoss-users
I tried it - did not work. Same behaviour. The rule now looks like this: evt.summary = "UC4 Executor stopped" if evt.AgentWorkInteger1=="1": evt.message="Mode: Primary" if evt.AgentWorkInteger1=="3": evt.message="Mode: Normal" if evt.AgentWorkInteger1=="4": evt.message="Mode: Communication" evt.message = evt.summary + " System/Server/Executor/Type: " + evt.AgentWorkObject + " " + evt.message The evt.message stays "untouched" and holds the "standard snmp" text: "snmp trap UC4ExecutorStopped from xyxyxxxyxyx" -------------------- m2f -------------------- Read this topic online here: http://community.zenoss.com/forums/viewtopic.php?p=19341#19341 -------------------- m2f -------------------- _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
