Sudhanshu Talw1
Tera Guru

Configuration of Completeness KPI:

I saw people asking how to configure 3 C’s metrics in CMDB OOB Health dashboard. What I believe it’s not about just get up & configure all 3 C’s in one go as each & everyone of it requires a process to be defined & implemented.

Thus in this article I am providing the steps required to configure Completeness KPI.

CMDB Health: Monitoring & Maintaining the health of CMDB.

Purpose of metrics:

The purpose of completeness metrics is to validate if a CI has the necessary data attributes or not. On a higher level it evaluates:

Are your CMDB CI’s populated with all the necessary data?

Completeness = Required(60%) + Recommended(40%)

The Completeness KPI is an aggregation of the following metrics:

  • Recommended
  • Required

The percentage shown is the OOB % ServiceNow provides. We can manipulate it as per our requirement.

find_real_file.png

 

Required metrics: allows you to mark some fields mandatory for a CI.

Recommended metrics: allows you to mark some fields which are recommended to be filled but not necessarily required. Having those recommended fields in CI provides more business value to CI.  

 

Note: Required fields are rarely used during initial implementation of CMDB. Recommended fields are used as required fields during initial implementation of CMDB. Marking a field mandatory does not allow IRE to push the data in the CI class if the required field is missing in the CI payload.

Let’s configure them one by one:

Use Case: I

I want to configure the completeness KPI only for the server class for now as taking a single example clarifies how to configure it.

Only windows & Linux servers along with discovery source is Servicenow to be included.

Step 1: Set up health inclusion rule:

As the name suggest health inclusion rules allows you to filter which CI's are calculated as part of the CMDB Health Dashboard. Filter the CI's that are included in health calculations and that appear in CMDB health dashboards by defining health inclusion rules.

Go to CI class manager:

find_real_file.png

 

find_real_file.png

 

 find_real_file.png

 

find_real_file.png

 

find_real_file.png

 

Note: Although we can only include required & recommended health metrics only but I have included all as it will be configured in the future.

The idea here is to apply health inclusion rule at the CI class level to include all the classes to which we want to run health jobs for & the class level filter is applied at the class level.

Let’s setup the server class level health inclusion rules.

find_real_file.png

 

 

Step 2: Configure Recommended metrics:

Open the CI class manager & go to server class.

Here I have marked assignment group, support group, model id, name, manufacturer as recommended fields

 find_real_file.png

Step 3: Configure Required metrics:

Open the dictionary entry for the column label you want to set mandatory/required & set mandatory checkbox as true or use dictionary override.

When to use dictionary override?

Consider a scenario: Fields like Serial Number.  Serial Number is a potential candidate to make required on the Hardware class and all of its extended classes.  However, Serial Number is an attribute defined on the base Configuration Items [cmdb_ci] class and by default is not a required field.

If we want to make it required only for the Hardware class and its extended classes, then a dictionary override can be used on the Hardware class to make the field mandatory without affecting any parent classes.

Scenario:

If a field must be marked as mandatory, irrespective of discovery source Identification Reconciliation Engine (IRE) is failing to create a record when the field marked as mandatory is missing in the payload of CI.

We can configure a system property to overcome this situation.

Set this property glide.required.attribute.enabled to false.

 

As we have configured the required & recommended metrics of completeness KPI, next step is to think what actions should be taken if a CI fails in completeness health scan & who will take those actions.

There comes the task assosciated with required & recommended metrics when a CI fails completeness KPI health scan. By default task creation is not enabled in ServiceNow.

How to enable task?

Go to application navigator & type health preferences:

 find_real_file.png

 

find_real_file.png

Go & hit the completeness job execution button & open & check the following tables:

Some important tables:

  • Recommended Field Task[recommended_field_remediation.LIST] =>Recommended field task for each CI failed
  • Required Field Task[required_field_remediation.LIST] =>Required Field task for each CI failed
  • CMDB Health result:[ cmdb_health_result.LIST] => Failure Health result, their task & corresponding metrics as well.
  • CMDB Health Metric Status [cmdb_health_metric_status.LIST]=>Holds the metric status while CMDB health job is being executed

When you open a task you will see remediation button. This requires a remediation rule to be defined & a workflow needs to attached to the remediation rule which allows you to automatically remediate the CI’s missing recommended or required attribute. This requires a defined process or some parameters on whose selection you can fill the missing fields.

 

Abbrevation used:

IRE: Identification & Reconciliation Engine

CMDB: Configuration Management Database

 

 

Thanks

Sudhanshu

 

 

Comments
Sandhya23
Tera Guru

Hi Sudhanshu,

 

Its a very detailed and very good document.

I have one question. In the above example, you have added the parent Server class in the health inclusion under base class and the sub classes of server to the health inclusion rules of the Server class itself.

1. Can we not add the sub-classes also to the base inclusion rule ?

2. What if we have many classes (with certain sub-classes) to be visible on the health dashboard. Do we add health inclusion to the cmdb base table (cmdb_ci) or to the individual classes ?

Sudhanshu Talw1
Tera Guru

Hi Sandhya,

Glad it helped you in any way. Thank you!

1. Can we not add the sub-classes also to the base inclusion rule ?

Yes, you can add the sub classes to the base inclusion rule on cmdb_ci table as well but somewhere the filter goes too long. That's why I used to follow this way. The parent class of sub classes is added to the cmdb_ci table & further the subclasses of parent class on the parent class itself.

The agenda is to go more general[parent] class to more specific class[subclass] here.

 

2. What if we have many classes (with certain sub-classes) to be visible on the health dashboard. Do we add health inclusion to the cmdb base table (cmdb_ci) or to the individual classes ?

The answer is whatever is more manageable to you. In my case i found the above approach more manageable.

Let me know if you have any concerns.

 

Thanks

Sudhanshu

 

Sandhya23
Tera Guru

Thank you, Sudhanshu. Your answer pretty much clarifies my doubt. 

Just sharing my observation while configuring the dashboard. Please correct me in case my understanding is wrong.

I applied Health Inclusion rules to the base table (cmdb_ci) and included all the parent CIs (only) in the filter condition. I did not apply the Health Inclusion Rules to the individual parent CI classes to include their child classes because I assumed that child classes will be automatically taken into consideration when a parent is added to the health inclusion rules. But I did not get the expected result that is the sub-classes did not appear in the dashboard. Then I added all the child classes to my inclusion rules in the base table and got the expected result. But as you rightly pointed above, this made my filter very clumsy, and you shared the cleaner way to do it.

So my question to you is - Is my above assumption wrong about the child classes. Do we explicitly need to mention every single class and child class in our health inclusion rules if they are to be viewed under the health dashboard?

 

Patrick Logan
Tera Contributor

Is it possible to have the Health Monitor flip a field on a CI? I'm hoping, if it finds a record to be incomplete, if could set a field on the CI to "Incomplete." Then a client script would add an error message on the screen, when a user access said recorder, notifying them of the missing information. We don't want to set these fields to mandatory but we do want to point out they should have a value. 

SN Arch Guy
Giga Guru

On a Utah system, I made the serial_number field mandatory (using a dictionary override) on the cmdb_ci table. However, when I look at the CI Class Manager, the field does not show as mandatory even though it shows mandatory on the dictionary entry and on all form views (computers, linux server, etc) that are subclasses of Hardware.

Is this the expected behavior, that the CI Class Manager does not show the mandatory field? See screen prints below.

 

 

SNArchGuy_3-1685030324469.png

 

SNArchGuy_0-1685030121630.png

 

SNArchGuy_1-1685030180759.png

 

 

Kannickal
Tera Contributor

Hi Sudhansu,

Very good article and thanks for sharing the knowledge. Just a quick question, not able to see the page shown in the last pic on step 1 to setup the health inclusion rules for the Windows Servers, Linux Servers while selecting the Server from the class manager. Also, may be this process enhanced in the latest release. A reply is appreciated.

 

Thanks/K

Todor Kotsev
Tera Contributor

Hello, I am trying to make a dashboard for the Network services and have a tab for each class (switch, wireless controller, router, etc). I want in each class to have completeness, compliance and correctness but they to be only showing the data for the corresponding class. So if I have five tabs of classes I would like to have 5 different completeness, compliance and correctness. is this possible? Thanks

Josh P1
Giga Guru

At a certain level of complexity our inclusion rules were becoming unwieldly.  Something I did to reduce the effort cost of keeping track of all the different classes that have inclusion rules (again, depending on your complexity):

With the addition of principal classes (Tokyo?); we can use the principal class filter in the base cmdb_ci inclusion rule.  This allows us to easily review and maintain which classes we have set as principal via cmdb_class_info.  Since principal class is (can be) also used to provide filtering for key task interactions such as incident, change, etc. this setup provides a link between ensure those classes used by important processes are "healthy", included in health metrics.

In short, we just added the javascript principal class script to the inclusion condition:

sys_class_nameINjavascript:new PrincipalClass().getPrincipalClasses()

The downside: last I tried, this was not do-able through the class manager interface.  You will need to do an import into the cmdb_health_config table, with the appropriate inclusion condition.  My recommendation is to navigate the cmdb_health_config.list and do an export of the existing entries to csv/xls.  Update the inclusion condition and then import using appropriate coalesce.  I usually preconfig the inclusion condition using CI Class Manager for things like the attribute conditions first then add the prefix to the condition.

sys_class_nameINjavascript:new PrincipalClass().getPrincipalClasses()^

Note the caret "^" at the end which implies AND.

Import and now I only have to maintain the principal class flags.  If you do need to update the inclusion condition, repeat the export > import as needed.  Additional granularity/adjustments to the inclusion rules can be done per class, however, those classes must be flagged as Principal to be included:

JoshP1_0-1726066844735.png

 

TodorK
Tera Contributor

Hello, 

do you know how can vizualize completeness for different classes but not choosing it from hiararchy?

Version history
Last update:
‎08-29-2020 02:38 AM
Updated by: