Quantcast
Channel: Zenoss Community: Message List
Viewing all articles
Browse latest Browse all 1118

Duplicate/Splintered Devices via ZenDMD - Help!

$
0
0

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.


Viewing all articles
Browse latest Browse all 1118

Trending Articles