Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

Reset Bindings on all devices

VERSION 2  Click to view document history
Created on: Sep 14, 2009 11:59 AM by Noel Brockett - Last Modified:  Mar 22, 2010 1:43 PM by Matt Ray

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"
Comments (0)