I don't know whether you can use all variables in all places but I have been
playing a little with zendmd and have found a couple of awesome commands. I am
not a Python programmer but these 2 helped me begin to understand what
variables and methods are available.
Start by inspecting the details of an event you are interested in, using the
Event Console, particularly the event id field.
Start up zendmd.
Use the great hint from Chet for helping to debug events and mappings:
evt=dmd.ZenEventManager.getEventDetailFromStatusOrHistory("<paste in your evid
here>)
for attr in dir(evt):
x=getattr(evt,attr)
print attr,x
Note the last 2 lines must be indented. The last line is a blank line. You
get scads of output but this does start to answer questions like what
attributes, methods and values are available.
You can do something similar to help understand attributes and methods
available for devices. I wanted to find the zProperties for a device.
dir(devices) shows all methods for devices
>From this, I found a method zenPropertyIds()
d=find('<substitute your hostname here>')
for attr in d.zenPropertyIds():
x=getattr(d,attr)
print attr,x
Enjoy! (and correct me if you know better!)
Cheers,
Jane
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=27580#27580
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users