Archived community.zenoss.org | full text search
Skip navigation
64 Views 1 Reply Latest reply: Mar 12, 2014 4:58 PM by chip RSS
chip Rank: White Belt 27 posts since
Nov 5, 2012
Currently Being Moderated

Mar 12, 2014 4:28 PM

Duplicate/Splintered Devices via ZenDMD - Help!

I've been poking at zendmd lately and cleaning up my mess of a Zenoss db.

Unsurprisingly I've managed to screw something up!  Doh.

 

I ran this little snippet below.  The intention was to fix the id to match our deviceTitle...  making it easier to for the techs to recognize the device when doing searches via the web ui.

 

for dclass in [dmd.Devices.Network.Router] + dmd.Devices.Network.Router.getSubOrganizers():

        if dclass.getPrimaryId() == "/zport/dmd/Devices/Network/Router/Firewall/Juniper":

                for d in dclass.devices():

                                                  if d.id != d.title:

                                                      d.id = d.title

                                                print "{0} changed to {1}".format(d.id,d.title)

                                                  else:

                                                            print "Device {0} matches title".format(d.id)

 

This seemed to work at first however I later noticed that the devices I ran it on didn't show graphs in zenoss.

Eventually after a lot of experimenting I found this while browsing my devices via the Zope interface.

 

http://i.imgur.com/hBT3GMZ.png

 

You can ignore the top few.  Look at the ones where the device is repeated with two names.

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points