By Tomasz Kasprzak
ServiceNow consultant, GuideVision
As ServiceNow implementations mature, many companies’ configuration management databases, or CMDBs, collect large numbers of configuration items, with numerous items not as new or out of date completely. This can make data quality worse and slow down your database performance.
As a way of making it easier to update information in situations like these, ServiceNow’s Rome release includes a new tool called the CMDB Data Manager. The CMDB Data Manager is a policy-driven framework which leverages Common Service Data Model (CSDM) life cycle standards. In CSDM, hardware or software catalog items go through individual phases – ideation, purchase, inventory, deployment and operation – before reaching their end of life. The CMDB Data Manager focuses primarily on these transition points, and life cycle standards help to effectively track assets as they move through the various stages of the cycle.
ServiceNow CMDB Data Manager: Ready-made policies
Out of the box, the new CMDB Data Manager includes policies which are intended to effectively retire CIs which can be archived and eventually deleted. As an extra precaution, life cycle stages are not able to jump from operational to end of life immediately – CIs first have to be retired and then archived.
The CMDB Data Manager is easy to set up. The first step is to activate Life Cycle Mapping, which applies life cycle standards to existing records and constantly applies them to new ones. This is done only once. Then you have to activate the CSDM Activation plugin, which enables the application itself. What’s best about all of this is that it’s completely free – no additional licenses are needed.
The CMDB Data Manager knows about the various roles and groups within the organisation. These include data manager admin and user. Roles can be customised according to needs; it’s possible to create a group called ‘Lenovo Inspectors,’ for example. The application also runs several scheduled jobs, such as a stale task cleaner, archive or delete policy processor and retire policy processor. For developers, the CMDB Data Manager Helper will be the most useful. It includes a number of functions that developers can take advantage of.
How to create policies in the CMDB Data Manager
Data admins have the ability to create policies within the CMDB Data Manager. For example, to set up a policy that automatically retires Lenovo computers that haven’t been updated in three months, the steps are simple. You can build in a function for ‘needs review’ with a simple check box, and that calls the task approval task should be generated for the new policy or not. If ‘needs review’ is not selected, when the policy is launched it will go through the CIs and automatically retire the Lenovo computers without any approval. (We think it’s a good practice to have approval of these policies, by the way.) The next step is to choose the policy type, where the options in this case are ‘delete, retire and archive.’
The CMDB Data Manager includes a powerful set of condition filters that let you be as specific in your criteria as you want, and the filters can include multiple criteria using AND or OR operators. In our example where we want to remove Lenovo computers that haven’t been updated in the past three months, this would be that ‘Class’ is a ‘Computer’, ‘Manufacturer’ is ‘Lenovo’ and ‘Updated’ is at or before ‘Last 3 months.’ The filter presents the count of records that match the condition, and the preview function lets you review the records.
CMDB Data Manager: From Policies to Actions
The Action section of the CMDB Data Manager includes a subflow for ‘Retire Configuration Items’ out-of-the-box. You can add your own actions as well, such as ‘Retire Configuration Items and corresponding assets’ – in this case it is used because the CMDB Data Manager does not yet have a syncing function between assets and CIs.
When defining the policy, the CMDB Data Manager provides an indication of the scope of work the policy will create; it displays the count of the number of CIs that may be impacted. This is in addition to providing a granular preview of the records the policy will affect. One nice feature of the preview is that in the listing of the affected records, you have the possibility of excluding individual records by simply ticking a checkbox. The CMDB Data Manager also displays a count of the tasks generated by the policy; in our example, there are two tasks generated because some of the computers have the ‘managed by group’ field set to ‘Lenovo Inspectors.’ In that case, the task will be generated for the members of that group. Another task will be generated for the remaining CIs and given to our admin.
Once the policy is ready, you publish it. It’s also important to note that it is possible to unpublish a policy; unpublished policies will not be triggered by scheduled jobs. The CMDB Data Manager provides an overview of policies, excluded CIs and open policy tasks on its main menu. This overview also provides detail on the number of drafts, the number of published policies, inactive policies and those that failed evaluation, in addition to the number of CIs deleted, and retired.
Scheduled jobs are set for around 3am out-of-the-box, but can also be triggered manually if necessary. The CMDB Data Manager also includes a task called ‘Stale Task Manager,’ which examines if no one has taken on a task in a certain amount of time – 90 days by default – and they are closed.
How to Archive and Delete in the CMDB Data Manager
The CMDB Data Manager also includes policy types for Archive and Delete. In the case of Archive, there is a checkbox for ‘Apply Retention Time,’ which lets us choose how long archived records should be stored in the Archive tables. If the checkbox is not checked, they will remain until manual action is taken on them.
What are Archive tables? They are used for storing archived CIs which can still be brought back if needed. In our example, we are working with computers, and the base table for them is ‘cmdb_ci_computer’ and in order to get to the Archive table we need to add an ‘ar_’ prefix so that we have ‘ar_cmdb_ci_computer’ in the link. These don’t have to be input manually – they can also be selected from the ‘System Archiving -> Archive Computer’ list on the left of the screen.
The CMDB Data Manager policy type for ‘Delete’ essentially serves as a death sentence for a configuration item record, meaning that it is deleted from the archiving tables.
CMDB Data Manager and Data Certification – What’s the difference?
The CMDB Data Manager is different from Data Certification in several key ways. Data Certification provides broader possibilities when it comes to deciding on the fields the approval assignment should be generated. For one, the CMDB Data Manager does not make it possible to assign approvals for multiple fields, select assignment types and only allows for policy/schedule run types, while Data Certification supports both approval assignments for multiple fields and assignment types selection, and can be either automated or on-demand. Data Certification is a useful tool, especially in audits.
Using both tools helps to improve the CMDB’s data quality and consistency. They make decision making on particular CIs easier.
Finally, an agent workspace CMDB-oriented extension is coming very soon. It provides a more comprehensive view of attributes than the default CI view, and allows you to inspect infrastructure relationships, open dependency views and check multisource data.