CMDB Health Dashboard provides a summary of the current health of organizations CMDB. Sometimes, the dashboard may behave unexpectedly showing negative values in the graphical user interface.
Release or Environment
- The percentage score is the measure of records which satisfies given compliance.
- In the above-attached screenshot, it was showing the record count as 23488/14178, which means that 23488 record entries found in cmdb_health_results table out of which total of 14178 entries in the group at the time of dashboard data calculation.
- In other words, the calculation goes as:
(Current number of cmdb_health_result records for failed CIs, which was correct at the time in the past that the scheduled health job last ran, but may not be now)/(Current number of cmdb_ci records, taking identification inclusion rules into account right now).
- The top/bottom of the fraction are not the same thing, and not necessarily updated at the same time, which can lead to weird results.
- For example, the customer could delete CIs, change the identification inclusion rules or have manually corrected the data perhaps, but the cmdb_health_result records won't be deleted and recreated until the next scheduled job runs.
The dashboard should turn positive when the audit jobs run next time and the records should get updated. If not, follow the below process:
- Go to Audits, either in CI Class Manager -> Health -> Compliance -> Audit, or Compliance -> Desired State -> Audits.
2. Run every audit. Wait until each one is finished. You can check the status in sys_trigger table and filter by the audit. If status is "Ready", it has finished running.
3. Run Compliance health scheduled job. Wait until complete.
4. Verify Compliance score.
Also, please makes sure that the "Run as" user do have certification_admin or admin roles.
In the documentation, only users with the above roles are allowed to execute audits, so I am thinking it applies to scheduled audits as well.
The dashboard should get fixed during the next scheduled run of the health job. However, if the discrepancies persist even when the next scheduled job is run, it is more unlikely that the graph would get corrected.
Our development team is working on improving this it should do better in the next upcoming releases.
If you have further questions regarding this, you can contact ServiceNow Technical Support.