extract log file

Luca3
Tera Contributor

Hi All,

For analyzing purpose, I need to have an extraction of the ServiceNow log files that contain this information

  • Ticket Nr
  • Ticket state
  • Company
  • channel
  • Resolution group
  • Impact
  • Urgency
  • Priority
  • Service
  • Service offering
  • caller

that the system write each time that an update occurs on the tickets (incident or Service Request)

How can do that ?

 

thanks 

Luca

3 REPLIES 3

Sandeep Rajput
Tera Patron
Tera Patron

I am assuming you are having a custom table to keep these logs. Now in order to add logs to this table, you need to create an onBefore, update business rule for Incident and Service Request tables. When ever the updates happen on any of these tables, the business rule will get called and inside the business rule script field, you can create GlideRecord object of your custom log table, set the values of the individual fields from the source record (e.g. incident or service request) and do a glideRecord.insert() to insert that record in the custom log table. 

 

Hope this helps.

Luca3
Tera Contributor

Hi Sandeep,

Is ti possible to extract these data from an existing table/view ?

I haven't a custom table

thanks

Luca

@Luca3 you would need a custom table to write these logs. Otherwise, where would you keep these logs when an incident or service request is updated.