Quantcast
Channel: Zenoss Community: Message List
Viewing all articles
Browse latest Browse all 1097

Re: How to handle enumerated type variable in snmp trap?

$
0
0

Hi sergey zagrebin,

                         

              Kindly try the following. Lets take the example from the trap you are getting the enum 1 and 2. Let assume '1' means ok and '2' means Failed.

 

By using transform you are getting enum to a variable 'x'. eg: x=getattr(evt,'varbindname'). Now create a python dictionary as follows

 

Status={1:'ok',2 : 'Failed'}

 

Value=Status[x]  #Where x is the value if the enum that is send from trap and captured inside transform.

 

Hope it helps

 

Thanks

Sandeep

 

 

    

    


Viewing all articles
Browse latest Browse all 1097

Trending Articles