Relation between Category, SubCategory and CI Class

snow_hard252
Kilo Contributor

Hi Community

I have couple of questions in Config and Asset management:

Though the cmdb_ci creation is driven by CI Class via the New interceptor in FUJI, I would like to understand the relationship between Category, Subcategory Fields on cmdb_ci and the particular CI Class.

Is the model_id the stitching field/attribute between the cmdb_ci and alm_asset tables , there by reflecting in Asset management and Configuration management?

Appreciate if some body can exemplify the above to questions.

Thanks

Hardy

10 REPLIES 10

juancarlos_muro
Kilo Expert

Hi Hardy,




Class is the table where the Configuration Item is stored.


For example, a record with class "cmdb_ci_linux_server" is stored in the table Linux Server. In ServiceNow CMDB follows a hierarchical approach, similar to inheritance in object oriented programming languages. The table [cmdb_ci_linux_server] extends from [cmdb_ci_server] which extends from [cmdb_ci_computer] which extends from [cmdb_ci_hardware] which extends from [cmdb_ci].


That way, linux servers will have their own fields plus the fields from each of those tables.



There is a lot of information about CMDB in our Wiki. The next one is a good introduction to CMDB:



-CMDB Classifications


http://wiki.servicenow.com/index.php?title=CMDB_Classifications



About Category, this is a calculated field.


In the definition of this field there is a dynamic filter that calculates the value of this field when a CI is created. The filter is "Get CMDB Item Category". This filter goes to the table "CMDB Categories [cmdb_categories]" and looks for the corresponding category and subcategory of the CI that is being created.



For example, if we are creating a linux server the filter will set category to "Hardware" and subcategory to "Computer" because there is an entry in "CMDB Categories [cmdb_categories]" with values "Name: cmdb_ci_linux_server, Category: Hardware, Subcategory: Computer".



Cheers,


Carlos


Hi Juan,



Appreciate your time in detailing me out.


The answer will surely help, but OOB Categories and Subcategories may not be sufficient in real-time.


So as you said there is an underlying relation ship between CI Class and Category+ Subcategory.


I want to add new combinations into Category & Subcategory which will suite the requirements at hand.



Please let me know your thoughts if this could be done and suggest me.



Regards


Hi Hardy,



Sure thing, you can add more combinations of   "Name / Category / Subcategory" to the table "CMDB Categories".



For that, go to https://<your-instance.service-now.com>/cmdb_categories_list.do and click New.


Keep in mind that ServiceNow won't let you add an entry for a class (Name) that already has an entry (ie, you can not add an entry for Linux Server because there is already one).



About Assets, you were in the good direction: model categories associate CI classes with Asset classes.



Those are the first words in the next Wiki article:


Model Categories - ServiceNow Wiki



Also very advised to read:


Creating New Models - ServiceNow Wiki



Best regards,


Carlos


Hi Carlos,



Thanks for the clarifications..


I want to understand the relation between sys_class_name & cmdb_ci_class.



However I'm still trying to understand the exacts :


1) category field in cmdb_ci.do : how is it related to cmdb_categories


2) class field in cmdb_categories : how is it related to sys_class_name   of cmdb_ci


3) cmdb_model_category : how is the cmdb_model_category , cmdb_ci_class related to cmdb_categories



To add to this:


As per wiki , there should be a model category for each CI Class.


I presume all the table names beginning with cmdb_ci_* , represent CI Class, which are 364 CI Class types


But when I filter the cmdb_ci.list based on Class, I can see only 30 Class types


And when I filter the cmdb_model_category.list based on CI Class, I can see 118 CI Class types



So I'm trying to correlate the things but I'm missing few links.


Appreciate your inputs, and apologies if I'm asking something really wrong.



Thanks