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

Finding Unbound Devices

VERSION 1 
Created on: Oct 26, 2009 2:09 PM by Matt Ray - Last Modified:  Oct 26, 2009 2:16 PM by Matt Ray

If you need to find all devices not currently bound to a Location, Group or System you can query the system to find these unbound devices.

 

1) First find all the devices and remove those with a set Location.  Write the following to a text file called "unbound":

 

#all devices

allset = set(dmd.Devices.getSubDevices())

#devices with the Location set

boundset = set(dmd.Devices.Locations.getSubDevices())

#remove the bound devices

allset - boundset


2) Run zendmd with the "unbound" file  and the output lists your unbound devices:

 

zenoss@calculon:~$ zendmd < unbound
Welcome to zenoss dmd command shell!
use zhelp() to list commands
set([<Device at /zport/dmd/Devices/Discovered/devices/
10.0.111.5>, <Device at /zport/dmd/Devices/Discovered/devices/
10.0.111.100>, <Device at /zport/dmd/Devices/Discovered/devices/
10.0.111.11>, <Device at /zport/dmd/Devices/Ping/devices/xbox>])


3)  You could modify the above for Groups or System similarly.  Feel free to clean it up however you need or turn it into a report.
Comments (1)

More Like This

  • Retrieving data ...

More by Matt Ray