Discussion:
How to delete events from history ?
zenorr
2012-05-09 15:06:36 UTC
Permalink
zenorr [http://community.zenoss.org/people/zenorr] created the discussion

"How to delete events from history ?"

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

--------------------------------------------------------------
Hi,

Using Zenoss Core 3.x, I'm writing a script to delete a device. I'm using

device = dmd.Devices.findDevice(device_name)
device.deleteDevice()
commit()

Now I would like to delete the associated events. Using

for evt in dmd.ZenEventManager.getEventList(where="device_name"):
       dmd.ZenEventManager.manage_deleteEvents(evt.evid)

I'm able to delete events from the "status" table. However, I'm missing the call to delete events from the history table. Any pointer ?

TIA,
Charles
--------------------------------------------------------------

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

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]
zenorr
2012-05-11 13:27:55 UTC
Permalink
zenorr [http://community.zenoss.org/people/zenorr] created the discussion

"Re: How to delete events from history ?"

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

--------------------------------------------------------------
OK, found an undocumented usage of ZenDeleteHistory.py :

$ZENHOME/Products/ZenUtils/ZenDeleteHistory.py --device=XXX --numDays=0 --cleanup
--------------------------------------------------------------

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

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