#!/opt/zenoss/bin/python # Quick utility script to export data from ZenOSS # gplv2 written Nov 20, 2008 Jeff Schroeder import Globals from Products.ZenUtils.ZenScriptBase import ZenScriptBase dmd = ZenScriptBase(connect=True).dmd print "%20s\t%40s\t%10s\t%10s" % ("NAME", "CLASS", "LOCATION", "GROUPS") for d in dmd.Devices.getSubDevices(): path = d.getDeviceClassPath() location = d.getLocationName() groups = d.getDeviceGroupNames() name = d.getDeviceName() print "%20s\t%40s\t%10s\t%10s" % (name, path, location, groups)