Discussion:
Accidental deletation of Standard Zenoss Reports
Nathan Harris
2011-11-15 16:58:37 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Dear all

Working with reports today, I had thought I had a custom report selected and hit delete. It look like I had the top level selected and now all the standard reprts has dissappeared.

Please can someoone help? we have file level backups and the Zenoss backups

A restore of last nights backup has resulted in no change

zenrestore --File=$ZENHOME/backups/zenbackup__date.tgz ---no-zodb --no-eventsdb --no-perfdata

any suggestions on how I get the reports back?

hope you can help
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2011-11-17 08:57:36 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Nathan Harris:

On the zenoss master as the zenoss user, cd $ZENHOME/Products/ZenReports and env python ReportLoader.py --force

This should reload all default reports.

Best,
--Shane (Hackman23)
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-11-17 09:54:46 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Thank you for replying Shane relly appreciatte it! I was begining to loose hair :)

When I run the CMD I get

[***@nlc19941 ZenReports]$ env python ReportLoader.py --force
2011-11-17 09:39:54,149 INFO zen.ReportLoader: loading reports from:reports
2011-11-17 09:39:54,376 INFO zen.ReportLoader: loading: /Event Reports/All Event                                      Classes
2011-11-17 09:39:54,483 INFO zen.ReportLoader: loading: /Event Reports/All Event                                      Mappings
2011-11-17 09:39:54,504 INFO zen.ReportLoader: loading: /Event Reports/All Heart                                      beats
2011-11-17 09:39:54,545 INFO zen.ReportLoader: loading: /Performance Reports/Int                                      erface Utilization
2011-11-17 09:39:54,589 INFO zen.ReportLoader: loading: /Performance Reports/Thr                                      eshold Summary
2011-11-17 09:39:54,637 INFO zen.ReportLoader: loading: /Performance Reports/Fil                                      esystem Util Report
2011-11-17 09:39:54,692 INFO zen.ReportLoader: loading: /Performance Reports/CPU                                       Utilization
2011-11-17 09:39:54,743 INFO zen.ReportLoader: loading: /Performance Reports/Mem                                      ory Utilization
2011-11-17 09:39:54,782 INFO zen.ReportLoader: loading: /Performance Reports/Agg                                      regate Reports
2011-11-17 09:39:54,819 INFO zen.ReportLoader: loading: /Performance Reports/Ava                                      ilability Report
2011-11-17 09:39:54,864 INFO zen.ReportLoader: loading: /Device Reports/SNMP Sta                                      tus Issues
2011-11-17 09:39:54,887 INFO zen.ReportLoader: loading: /Device Reports/Software                                       Inventory
2011-11-17 09:39:54,917 INFO zen.ReportLoader: loading: /Device Reports/All Moni                                      tored Components
2011-11-17 09:39:54,940 INFO zen.ReportLoader: loading: /Device Reports/All Devi                                      ces
2011-11-17 09:39:54,966 INFO zen.ReportLoader: loading: /Device Reports/Ping Sta                                      tus Issues
2011-11-17 09:39:54,983 INFO zen.ReportLoader: loading: /Device Reports/Device C                                      hanges
2011-11-17 09:39:55,007 INFO zen.ReportLoader: loading: /Device Reports/Model Co                                      llection Age
2011-11-17 09:39:55,030 INFO zen.ReportLoader: loading: /Device Reports/New Devi                                      ces
2011-11-17 09:39:55,064 INFO zen.ReportLoader: loading: /User Reports/Notificati                                      on Schedules
When I go the reports page I still get a blank page (tried reboot and clearing local browser cache)

http://community.zenoss.org/servlet/JiveServlet/showImage/2-62670-10597/zenossReport.bmp http://community.zenoss.org/servlet/JiveServlet/downloadImage/2-62670-10597/450-237/zenossReport.bmp
From what I remember all I did was create a report in the top level and then delete it, but it looks like I somehow deleted the top level container. I can not add any new reports either.

We have a full backup of the system on the Zenoss Core but also at file level on TSM tivoli backup

I am hoping we just need to restore some configuration file somewhere as it appears all the reports are present on the system, its just not shown in the zenoss console.

cheers Nathan :|


--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2011-11-17 13:52:52 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Nathan Harris:

It's no problem.

Before we try this next item back up Data.fs. It'll be in $ZENHOME/var/.

Once done, as the zenoss user on the zenoss master run zenmigrate --level=1.1.0

It could take a really long time if the instance is large. There are a number of zenmigrate steps to build reports. I don't know if it'll fix the problem, but, it's worth a shot.

Let me know how you fare.

Best,
--Shane (Hackman238)
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-11-17 16:59:35 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Hi Shane, It returns an error, does this point to anything?

[***@nlc19941 var]$ zenmigrate --level=1.1.0
INFO:zen.migrate:Installing BetterStandardErrorMessage (1.1.0)
INFO:zen.migrate:Installing ChangeEventClasses (1.1.0)
INFO:zen.migrate:Installing DefaultCommandTimeout (1.1.0)
INFO:zen.migrate:Installing DevicePriority (1.1.0)
WARNING:zen.migrate:Recovering
Traceback (most recent call last):
  File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in <module>
    main()
  File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in main
    m.main()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 417, in main
    self.cutover()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 304, in cutover
    self.migrate()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 280, in migrate
    m.cutover(self.dmd)
  File "/opt/zenoss/Products/ZenModel/migrate/devicepriority.py", line 71, in cutover
    zem = self.dmd.ZenEventManager
AttributeError: DevicePriority instance has no attribute 'dmd'
[***@nlc19941 var]$

--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2011-11-17 17:07:13 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Nathan Harris:

Hum. Looks like for some reason theres a context issue. We'll work around it.

zenmigrate --step='ReportServer'

then

zenmigrate --level=2.0.0

--Shane (Hackman238)
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-11-17 17:17:46 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
A little more progress, the Key Error 'Capita ONE' is the report I created (which started the whole issue)

Is there some way to remove this from the system?

[***@nlc19941 var]$ zenmigrate --step='ReportServer'
INFO:zen.migrate:Will execute these steps: ReportServer
INFO:zen.migrate:Installing ReportServer (1.1.0)
INFO:zen.migrate:Committing changes
INFO:zen.migrate:Migration successful
[***@nlc19941 var]$
[***@nlc19941 var]$ zenmigrate --level=2.0.0
INFO:zen.migrate:Installing AddExpectRegex (2.0.0)
INFO:zen.migrate:Installing DeviceTemplatesProperty (2.0.0)
INFO:zen.migrate:Installing EvenBetterStandardErrorMessage (2.0.0)
INFO:zen.migrate:Installing EventClassMapping (2.0.0)
INFO:zen.migrate:Installing MenuRelations (2.0.0)
INFO:zen.migrate:Installing NewDeviceIndexes (2.0.0)
INFO:zen.migrate:Installing ProcessSequence (2.0.0)
INFO:zen.migrate:Installing TwoPointOhObjects (2.0.0)
INFO:zen.migrate:Installing ZLocalIps (2.0.0)
INFO:zen.migrate:Installing ZenPackDataSources (2.0.0)
Converted 0 DataSources
INFO:zen.migrate:Installing ZenUILayer (2.0.0)
INFO:zen.migrate:Installing addWinService (2.0.0)
INFO:zen.migrate:Installing convertOSSoftwareClass (2.0.0)
INFO:zen.migrate:Installing zCollectorLogChanges (2.0.0)
INFO:zen.migrate:Installing zCollectorPlugins (2.0.0)
INFO:zen.migrate:Installing zPropsCleanup (2.0.0)
INFO:zen.migrate:Installing zWmiMonitorProperty (2.0.0)
INFO:zen.migrate:Installing AddGroupManager (2.1.0)
INFO:zen.migrate:Installing AnnoyingAlerts (2.1.0)
INFO:zen.migrate:Installing BanClassesOnAddToZenPackMenuItem (2.1.0)
INFO:zen.migrate:Installing BanClassesOnDeviceListMenus (2.1.0)
INFO:zen.migrate:Installing BaseReportClasses (2.1.0)
INFO:zen.migrate:Installing DeleteADPNewProductClass (2.1.0)
INFO:zen.migrate:Could not find the manufacturer ADP
INFO:zen.migrate:Installing GraphReports (2.1.0)
INFO:zen.migrate:Installing Linkability (2.1.0)
INFO:zen.migrate:Installing MultiGraphReports (2.1.0)
WARNING:zen.migrate:Recovering
Traceback (most recent call last):
  File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in <module>
    main()
  File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in main
    m.main()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 417, in main
    self.cutover()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 304, in cutover
    self.migrate()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 280, in migrate
    m.cutover(self.dmd)
  File "/opt/zenoss/Products/ZenModel/migrate/multiGraphReports.py", line 69, in cutover
    for gp in WalkGraphPoints(dmd.Reports):
  File "/opt/zenoss/Products/ZenModel/migrate/multiGraphReports.py", line 58, in WalkGraphPoints
    for report in reportClass.reports():
  File "/opt/zenoss/Products/ZenModel/ReportClass.py", line 131, in reports
    if self.checkRemotePerm('View', r):
  File "/opt/zenoss/Products/ZenModel/ZenModelBase.py", line 323, in checkRemotePerm
    return user.has_permission(permission, robject.primaryAq())
  File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 80, in primaryAq
    return getObjByPath(app, self.getPrimaryPath())
  File "/opt/zenoss/Products/ZenUtils/Utils.py", line 243, in getObjByPath
    next = bobo_traverse(REQUEST, name)
  File "/opt/zenoss/lib/python/OFS/Application.py", line 148, in __bobo_traverse__
    raise KeyError, name
KeyError: 'Capita ONE'

--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2011-11-17 17:57:56 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Natha Harris:

Let's delete that puppy.

zendmd

for i in dmd.Reports.getSubObjects():
    try:
        if i.id == 'Capita ONE':
            print 'Found it!'
            dmd.Reports._delOb(i.id)
    except:
        pass



commit()


Let me know if it finds the key.

Best,
--Shane (Hackman238)
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-11-18 09:55:22 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
[***@nlc19941 var]$ zendmd
Welcome to the Zenoss dmd command shell!
'dmd' is bound to the DataRoot. 'zhelp()' to get a list of commands.
Use TAB-TAB to see a list of zendmd related commands.
Tab completion also works for objects -- hit tab after an object name and '.'
(eg dmd. + tab-key).
...     try:
...         if i.id == 'Capita ONE':
...             print 'Found it!'
...             dmd.Reports._delOb(i.id)
...     except:
...         pass
...
Found it!
Found it!
Post by Shane Scott
commit()
Well its found it :) Please advise ( I must admit I am in over my head now)


--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2011-11-18 17:34:24 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Nathan Harris:

Looking good. Lets redo some zenmigrate stuff.

zenmigrate --step='ReportServer'

then

zenmigrate --level=2.0.0

--Shane (Hackman238)
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-11-21 11:20:16 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Hi Shane

I am I missing something, do we have add a delete CMD ? error still happening below :-/

[***@nlc19941 ~]$ *zendmd*
Welcome to the Zenoss dmd command shell!
'dmd' is bound to the DataRoot. 'zhelp()' to get a list of commands.
Use TAB-TAB to see a list of zendmd related commands.
Tab completion also works for objects -- hit tab after an object name and '.'
(eg dmd. + tab-key).
...     try:
...          if i.id == 'Capita ONE':
...             print 'Found it!'
...             dmd.Reports._delOb(i.id)
...     except:
...         pass
...
Found it!
Found it!
Post by Shane Scott
commit()
*CTRL + d*
[***@nlc19941 ~]$ zenmigrate --step='ReportServer'
INFO:zen.migrate:Will execute these steps: ReportServer
INFO:zen.migrate:Installing ReportServer (1.1.0)
INFO:zen.migrate:Committing changes
INFO:zen.migrate:Migration successful
[***@nlc19941 ~]$
[***@nlc19941 ~]$ zenmigrate --level=2.0.0
INFO:zen.migrate:Installing AddExpectRegex (2.0.0)
INFO:zen.migrate:Installing DeviceTemplatesProperty (2.0.0)
INFO:zen.migrate:Installing EvenBetterStandardErrorMessage (2.0.0)
INFO:zen.migrate:Installing EventClassMapping (2.0.0)
INFO:zen.migrate:Installing MenuRelations (2.0.0)
INFO:zen.migrate:Installing NewDeviceIndexes (2.0.0)
INFO:zen.migrate:Installing ProcessSequence (2.0.0)
INFO:zen.migrate:Installing TwoPointOhObjects (2.0.0)
INFO:zen.migrate:Installing ZLocalIps (2.0.0)
INFO:zen.migrate:Installing ZenPackDataSources (2.0.0)
Converted 0 DataSources
INFO:zen.migrate:Installing ZenUILayer (2.0.0)
INFO:zen.migrate:Installing addWinService (2.0.0)
INFO:zen.migrate:Installing convertOSSoftwareClass (2.0.0)
INFO:zen.migrate:Installing zCollectorLogChanges (2.0.0)
INFO:zen.migrate:Installing zCollectorPlugins (2.0.0)
INFO:zen.migrate:Installing zPropsCleanup (2.0.0)
INFO:zen.migrate:Installing zWmiMonitorProperty (2.0.0)
INFO:zen.migrate:Installing AddGroupManager (2.1.0)
INFO:zen.migrate:Installing AnnoyingAlerts (2.1.0)
INFO:zen.migrate:Installing BanClassesOnAddToZenPackMenuItem (2.1.0)
INFO:zen.migrate:Installing BanClassesOnDeviceListMenus (2.1.0)
INFO:zen.migrate:Installing BaseReportClasses (2.1.0)
INFO:zen.migrate:Installing DeleteADPNewProductClass (2.1.0)
INFO:zen.migrate:Could not find the manufacturer ADP
INFO:zen.migrate:Installing GraphReports (2.1.0)
INFO:zen.migrate:Installing Linkability (2.1.0)
INFO:zen.migrate:Installing MultiGraphReports (2.1.0)
WARNING:zen.migrate:Recovering
Traceback (most recent call last):
  File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in <module>
    main()
  File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in main
    m.main()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 417, in main
    self.cutover()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 304, in cutover
    self.migrate()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 280, in migrate
    m.cutover(self.dmd)
  File "/opt/zenoss/Products/ZenModel/migrate/multiGraphReports.py", line 69, in cutover
    for gp in WalkGraphPoints(dmd.Reports):
  File "/opt/zenoss/Products/ZenModel/migrate/multiGraphReports.py", line 58, in WalkGraphPoints
    for report in reportClass.reports():
  File "/opt/zenoss/Products/ZenModel/ReportClass.py", line 131, in reports
    if self.checkRemotePerm('View', r):
  File "/opt/zenoss/Products/ZenModel/ZenModelBase.py", line 323, in checkRemotePerm
    return user.has_permission(permission, robject.primaryAq())
  File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 80, in primaryAq
    return getObjByPath(app, self.getPrimaryPath())
  File "/opt/zenoss/Products/ZenUtils/Utils.py", line 243, in getObjByPath
    next = bobo_traverse(REQUEST, name)
  File "/opt/zenoss/lib/python/OFS/Application.py", line 148, in __bobo_traverse__
    raise KeyError, name
KeyError: 'Capita ONE'

--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-11-22 09:32:30 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Hi Shane

Hoping you may be around but is this the issue

dmd.Reports._delOb(i.id)
should this not be

dmd.Reports._delete(i.id) ????

:|
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2011-11-22 16:51:11 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Nathan Harris:

Let's try

for i in dmd.Reports.getSubObjects():
    if i.id == 'Capita ONE':
        print 'Found it!'
        dmd.Reports._delOb(i.id)

commit()

I'm unsure why it didnt remove the objects so this method will give us more feedback.

Thanks Nathan!

Best,
--Shane (Hackman238)
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-11-23 09:01:37 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Hi Shane, I now get

Found it!
Traceback (most recent call last):
  File "<console>", line 4, in <module>
  File "/opt/zenoss/lib/python/OFS/CopySupport.py", line 85, in _delOb
    delattr(self, id)
AttributeError: Capita ONE
Post by Shane Scott
commit()
is this a good sign?


--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2011-11-23 22:11:39 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Nathan Harris:

vi "/opt/zenoss/lib/python/OFS/CopySupport.py"

Modify def _getOb to be the following:

def _getOb(self, id, default=_marker):
        try:
            if hasattr(aq_base(self), id):
                return getattr(self, id)
            if default is _marker:
                raise AttributeError, id
            return default
        except Exception:
            pass


Restart zenoss and rerun in zendmd

for i in dmd.Reports.getSubObjects():
    if i.id == 'Capita ONE':
        print 'Found it!'
        dmd.Reports._delOb(i.id)

commit()

Thanks Nathan!

Best,
--Shane (Hackman238)
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-11-24 16:12:48 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Hi Shane, Thank you for persevering for me, after making the change to the file I ran the following and now get this error (end line below) is it possible just to restore the reports to there default position by using original files from two weeks ago, we had no custom reports so would loose nothing of importance?
...     if i.id == 'Capita ONE':
...         print 'Found it!'
...         dmd.Reports._delOb(i.id)
...
Found it!
Traceback (most recent call last):
  File "<console>", line 4, in <module>
  File "/opt/zenoss/lib/python/OFS/CopySupport.py", line 85, in _delOb
    delattr(self, id)
AttributeError: Capita ONE
Post by Shane Scott
commit()
[***@nlc19941 ~]$ zenmigrate --step='ReportServer'
INFO:zen.migrate:Will execute these steps: ReportServer
INFO:zen.migrate:Installing ReportServer (1.1.0)
INFO:zen.migrate:Committing changes
INFO:zen.migrate:Migration successful
[***@nlc19941 ~]$
[***@nlc19941 ~]$ zenmigrate --level=2.0.0
INFO:zen.migrate:Installing AddExpectRegex (2.0.0)
INFO:zen.migrate:Installing DeviceTemplatesProperty (2.0.0)
INFO:zen.migrate:Installing EvenBetterStandardErrorMessage (2.0.0)
INFO:zen.migrate:Installing EventClassMapping (2.0.0)
INFO:zen.migrate:Installing MenuRelations (2.0.0)
INFO:zen.migrate:Installing NewDeviceIndexes (2.0.0)
INFO:zen.migrate:Installing ProcessSequence (2.0.0)
INFO:zen.migrate:Installing TwoPointOhObjects (2.0.0)
INFO:zen.migrate:Installing ZLocalIps (2.0.0)
INFO:zen.migrate:Installing ZenPackDataSources (2.0.0)
Converted 0 DataSources
INFO:zen.migrate:Installing ZenUILayer (2.0.0)
INFO:zen.migrate:Installing addWinService (2.0.0)
INFO:zen.migrate:Installing convertOSSoftwareClass (2.0.0)
INFO:zen.migrate:Installing zCollectorLogChanges (2.0.0)
INFO:zen.migrate:Installing zCollectorPlugins (2.0.0)
INFO:zen.migrate:Installing zPropsCleanup (2.0.0)
INFO:zen.migrate:Installing zWmiMonitorProperty (2.0.0)
INFO:zen.migrate:Installing AddGroupManager (2.1.0)
INFO:zen.migrate:Installing AnnoyingAlerts (2.1.0)
INFO:zen.migrate:Installing BanClassesOnAddToZenPackMenuItem (2.1.0)
INFO:zen.migrate:Installing BanClassesOnDeviceListMenus (2.1.0)
INFO:zen.migrate:Installing BaseReportClasses (2.1.0)
INFO:zen.migrate:Installing DeleteADPNewProductClass (2.1.0)
INFO:zen.migrate:Could not find the manufacturer ADP
INFO:zen.migrate:Installing GraphReports (2.1.0)
INFO:zen.migrate:Installing Linkability (2.1.0)
INFO:zen.migrate:Installing MultiGraphReports (2.1.0)
WARNING:zen.migrate:Recovering
Traceback (most recent call last):
  File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in <module>
    main()
  File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in main
    m.main()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 417, in main
    self.cutover()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 304, in cutover
    self.migrate()
  File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 280, in migrate
    m.cutover(self.dmd)
  File "/opt/zenoss/Products/ZenModel/migrate/multiGraphReports.py", line 69, in cutover
    for gp in WalkGraphPoints(dmd.Reports):
  File "/opt/zenoss/Products/ZenModel/migrate/multiGraphReports.py", line 58, in WalkGraphPoints
    for report in reportClass.reports():
  File "/opt/zenoss/Products/ZenModel/ReportClass.py", line 131, in reports
    if self.checkRemotePerm('View', r):
  File "/opt/zenoss/Products/ZenModel/ZenModelBase.py", line 323, in checkRemotePerm
    return user.has_permission(permission, robject.primaryAq())
  File "/opt/zenoss/Products/ZenRelations/PrimaryPathObjectManager.py", line 80, in primaryAq
    return getObjByPath(app, self.getPrimaryPath())
  File "/opt/zenoss/Products/ZenUtils/Utils.py", line 243, in getObjByPath
    next = bobo_traverse(REQUEST, name)
*  File "/opt/zenoss/lib/python/OFS/Application.py", line 148, in __bobo_traverse__*
*    raise KeyError, name*
*KeyError: 'Capita ONE'*


--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-12-09 13:58:52 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Hi Shane

Still struggling with this issue, it is our belief that the database is corrupted by this Capita ONE object existing where it should not. I must have dropped it in the top container causing the report system to disappear.

Your last suggestion I had to back out as the servers stopped login any data in Zenoss (for example the CPU graphing stopped working for all servers)

Is there no way to delete this object in some sort of wild card? I can snapshot the machine before we try it?

Hope you can help as I fear building a new instance will just result in the same outcome once we restore the Zenoss backups...which could mean we have to start from scratch almost or forget reporting alltogether.

cheers

Nathan
--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Nathan Harris
2011-12-13 10:17:38 UTC
Permalink
Nathan Harris [http://community.zenoss.org/people/nathan.harris] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Wahuuuuuu fixed it!

Hi everyone

the fix in the end was rather simple, it turns out I had not deleted the object but rather placed a report in the tree top level causing the reports menu to disappear.

If you have this problem simply point your browser to

http://localhost:8080/zport/dmd/Reports/test/manage http://localhost:8080/zport/dmd/Reports/test/manage

I could see the offending object at the top level and simply selected it and hit delete

all the reporst magically appeared! such a happy feeling

:)

--------------------------------------------------------------

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

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2011-12-13 15:05:12 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: Accidental deletation of Standard Zenoss Reports"

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

--------------------------------------------------------------
Nathan:

Glad you got it fixed!

Be careful in /manage :)

--Shane
--------------------------------------------------------------

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

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