Need to run a report on the Sys Audit (Very Aware of the Implications)

DeepThinker
Giga Contributor

My company would like to run a report on the sys_audit table to see the previously "assigned to" value on the cmdb_ci_computer table. We want to do this on CIs assigned to one particular individual. We've updated a property on our instance that allows reporting on the sys_audit table and we are aware of the implications, however it is important to the business that we get this information. Simply running a report on sys_audit with the conditions: Old Value = not empty; New Value = (Person'sName); Table Name = cmdb_ci_computer; Field Name = Assigned to.... is not producing any results. As a matter of fact the report times out. Can anyone suggest a better way to produce this report. 

6 REPLIES 6

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi,

I would suggest creating a Metric definition to run on that field and store the values. Then run the report on that metric.

//Göran
Feel free to connect with me:
LinkedIn & Twitter
Subscribe to my YouTube Channel
Buy The Witch Doctor's Guide To ServiceNow

Thank you. Can you elaborate on what you mean by store the values?

For example take a look at the Baseline Metric definition "Assignment group" on the incident table. It stores metrics each time the value in assignment group changes. This can you later on use to for example see all incident that has passed through a specific group. I would compare this as a computer has "passed through" a specific owner.

find_real_file.png

Now, the bad part here that might mess up your requirements is that metrics doesn't look "backwards". It only starts loggning when you have created the Metric definition. IF you have PA, then you can also do it historically since there is build in jobs that can look through the sys_audit and build the data for you.

//Göran
Feel free to connect with me:
LinkedIn & Twitter
Subscribe to my YouTube Channel
Buy The Witch Doctor's Guide To ServiceNow

JeremyHoffman
Tera Guru

Why do you need a report versus viewing the table (short cut --> sys_audit.list in the App navigator search bar) and then build a filter and save it? You can export this filtered list and send it off via email. We do not use the assigned to, however, I was able to successfully create a filtered view on the table with the only modification to what you indicate above being New Value "is Different" from old value.  That will show all the changes.  Since we don't use assigned to, I set the field name to install status and did not have any issues.  Hopefully this helps.