Discussion:
Duplicate/Splintered Devices via ZenDMD - Help!
James T
2014-03-12 20:28:23 UTC
Permalink
James T [http://community.zenoss.org/people/chip] created the discussion

"Duplicate/Splintered Devices via ZenDMD - Help!"

To view the discussion, visit: http://community.zenoss.org/message/75723#75723

--------------------------------------------------------------
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.

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

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

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/75723#75723]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
James T
2014-03-12 20:58:14 UTC
Permalink
James T [http://community.zenoss.org/people/chip] created the discussion

"Re: Duplicate/Splintered Devices via ZenDMD - Help!"

To view the discussion, visit: http://community.zenoss.org/message/75724#75724

--------------------------------------------------------------
moved to http://zenoss.org/forum/586 http://zenoss.org/forum/586
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/75724#75724]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...