ZenDMD Tip - Fix Broken Graph Report Elements

From Zenoss Wiki
Revision as of 14:13, 20 November 2013 by Crouthamela (Talk | contribs)$7

Jump to: navigation, search

To fix Graph Reports broken by invalid or missing components, su zenoss and zendmd. Run the following.

  children = dmd.Reports.children()
  for c in children:
      if c.id == "Graph Reports":
          for reportsParent in c.getSubOrganizers():
              reports = reportsParent.reports()
              for r in reports:
                  for i in r.getElements():
                      ii = i.getComponent()
                      if not ii:
                          print "I couldn't get object " + str(i.id) + " listed in report " + str(r.id) + " in organizer " + str(reportsParent.id) 

Best, --Shane Scott (Hackman238)