Active IQ Unified Manager Discussions

Permanently remove events

marcinl
9,061 Views

Hello,

Is there any way to permanently remove events from OnCommand database? For other objects like hosts it's possible to run "dfm host delete -f" when only sql service is up and this will really remove the object (not only mark it as deleted).
For events I don't see such option.

Is the only way to do this by executing sql command on the database?

1 ACCEPTED SOLUTION

STORAGE_CIT
9,058 Views

Do you want to delete the events by their date or by the content?

If first, then you can use the dfm-option 'eventsPurgeInterval'

By default, it´s set to 25.71 weeks (half a year)

Just set it to (e.g.) 1 day and then wait for another day (until DFM has reorganized it´s ultra-light database)

View solution in original post

12 REPLIES 12

marcinl
8,938 Views

OK. I've tried to remove the event directly from database but it's not allowed

monitoring:~ # dfm database query run "delete from eventView where eventID=1;"

Error in delete from eventView where eventID=1;: (-121) [Sybase][ODBC Driver][SQL Anywhere]Permission denied: you do not have permission to delete from "eventView"

Error: Error executing delete from eventView where eventID=1;: -121: [Sybase][ODBC Driver][SQL Anywhere]Permission denied: you do not have permission to delete from "eventView"

agireesh
8,939 Views

Hi Marcinl,

There is no way to delete the events permanently from DFM server. Database user can only view the database tables but he cannot delete the data from database view.

You can use "dfm event delete <event-ids> ..." command to delete the events from dfm but this command doesn't delete the event permanently. Event will be moved to event history table

once you delete the event using this command

Regards,

Gireesh

adaikkap
8,938 Views

Hi Marcinal,

                dfm database query run are read-only views so you wont be able to delete. Also doing a dfm host delete -f does not have a cascade delete on the events table. So events will still be there.

As advised by others you can raise a case and get this cleaned. BTW how many millions of events do you have ? Is there any specific reason why you want to delete the events ?

Regards

adai

marcinl
8,938 Views

There are not so many events but the VM holding OnCommand will be handed over to different customer. There are some scripts installed as well as performance views and thresholds so I don't want to thrash whole OC5. I want to keep the database but as clean as possible.

adaikkap
8,938 Views

Hi Marcinal,

                     Since you want to clean up the db, and I assume you can afford downtime if so stop all dfm service, start only sql service and do a event delete using -f cli in a loop cli.

Regards

adai

adaikkap
8,938 Views

Thanks to gireesh for remaining me. There is no way to delete an event as there is no -f options for dfm event delete.

Regards

adai

marcinl
8,938 Views

Yes, as I wrote in the first post - I know how to delete other objects like host with usage of -f but there is no such switch for events.

ronaldmajor
8,938 Views

I had and still have this problem and I do not know why this is an issue.  You will have to open a case with tech support.  They will install some stored procedures and then run some scripts to clean out the old events.  You will need to tell them what you want deleted, i.e. delete events older than 6 months, so they can customize the script.  The stored procedured will need to be removed when you are done so they will not interfere with any dfm upgrades.  I am about to do this myself very shortly.

STORAGE_CIT
9,059 Views

Do you want to delete the events by their date or by the content?

If first, then you can use the dfm-option 'eventsPurgeInterval'

By default, it´s set to 25.71 weeks (half a year)

Just set it to (e.g.) 1 day and then wait for another day (until DFM has reorganized it´s ultra-light database)

marcinl
12,383 Views

Thx. This is it. How come I could not think about it before

adaikkap
12,384 Views

Hi Marcinal,

                      This options only purges those events which are no more affecting the status of any object that is being monitored in dfm. So if there is an event that affects the objects status like a volume/qtree such events are not purged even if they are beyond the specified purge interval.

Regards

adai

marcinl
12,385 Views

Yes, that's fine. As I wrote the OnCommand will be handed over to different customer. All hosts have been deleted (with -f) already.

Public