Handy zendmd scripts for automating tasks
Zendmd is a powerful python shell that interacts with Zenoss. Here are some handy scripts to perform tasks.
To use, just save the text to file and execute this command as the zenoss user.
zendmd < <script>
- Reset Bindings on all devices
for dev in dmd.Devices.Server.Linux.getSubDevices():
reset = []
try:
dev.removeZDeviceTemplates()
reset.append(dev)
except:
continue
if(reset):
for v in reset:
print "reset bindings on %s" % v
commit()
else:
print "\nNo bindings reset\n"