Deleting old records from the Event table

edvarda_e
Kilo Contributor

Hello friends!

I am making an Event Management application that measures temperatures in a fridge and creates Events whenever the temperature is too high.

Furthermore if the high temperature persists then I proceed to create Alerts and Incidents.

I see that the Table Cleaner automatically clears out closed Alerts after 90 dates, but as far as I can tell there's no clean up for the Event table. Now my application won't create too many events, but over the years it will grow indefinitely and no one likes to deal with an unmanageable table.

So even if ServiceNow can scale, what's the best practice for deleting records in the Event table over time? Would it be something like a background script, examples in point 4 of Deletion methods and Delete scheduled Events? And if I want to save the table history for statistic over the years how would I do that?

Thanks in advance and best regards,

Edvarda Eriksen

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Edvarda,



The nice thing about cloud services is that you generally don't need to worry about storage. We have customers that are generating 10s of thousands of incidents a day. It sounds like your fridge won't be near that amount of traffic, so in general, I wouldn't worry about it.



To answer some of your questions:



You COULD delete the data after 1 year (or whatever you chose - I recommend using a property here.) If you delete a record, the history is gone as well (since there's no record to attach the history to)



You could also look at archiving of old data. http://wiki.servicenow.com/index.php?title=Archiving_Data


View solution in original post

6 REPLIES 6

Ah I see, than you so much! This is very useful to know, especially as I want statistics of the data over time.


Would you also say that archiving the data is the best practice?


If you want statistics over time consider looking at Performance Analytics. It doesn't store the data, but rather the metadata related to your data (e.g. a record that just has a count of how many records, not the records themselves.)



Performance Analytics - ServiceNow Wiki


Getting Started with Performance Analytics - ServiceNow Wiki