Prepare a scripted audit for the compliance KPI

To include a scripted audit in CMDB Health compliance calculations, you need to update the audit's script so it captures the time that the audit ran last.

Before you begin

Role required: certification_admin

About this task

CMDB Health uses audits' Last run date to collect the results from the most recent complete audit run. These results are then aggregated into the CMDB Health compliance KPI. When scripted audits run, they do not register the runtime. Therefore, to include scripted audits in the compliance KPI health aggregation, you must update the audit script so it populates the Last run date field.

Procedure

  1. Create or edit a scripted audit .
  2. On the Audit form, update the script in Run this script. Add the following code at the top of the script, just before the code that filters CIs:new SNC.CertificationProcessing().updateLastRunDate(current.sys_id);’