Notifications

55 views

Description

Some CMDB records have empty assets. How can we create assets for multiple CMDB records?

Release or Environment

All supported releases.

Cause

The "Create Asset on insert" business rule creates an asset for the CI when the CI is inserted. This business rule only runs on insert.

Here are some of the reasons why a CMDB record may have an empty Asset:

  • CIs imported and import was not configured to run business rules
  • Error when creating asset (further investigation would be necessary in this case)
  • Business rule "Create Asset on insert" not active/present at time of CI insert

Resolution

The missing assets could be created via the UI or scripts.

Note: Perform any testing in a non-production instance first.

From UI

  1. Navigate to the CI with the empty asset and click on the Mode ID, model_id
  2. Once the cmdb_model loads, click on the model category the CI belongs to
  3. Click on "Create Assets"

From Scripts

Assets can also be created via "Scripts - Background", scheduled jobs, and fix scripts with the following methods:

  • To create assets for multiple CIs:
    AssetandCI.createMultipleAssets('<sys_id_of_cmdb_model_category>');
  • To create an asset for a single CI:
    AssetandCI.createAsset('<ci_sys_id>');

Note: See script include AssetandCI for other methods available.

Additional Information

Article Information

Last Updated:2019-10-21 12:07:12
Published:2019-10-16