What is the table for CI Class Manager's 'Basic Info'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 03:01 PM
In the CI Class Manager, there is a 'Basic Info' section that has the field 'Managed By Group' where you can set this value for all CIs in that class. This is some kind of 'metadata' that is tracked at the class level not on the CIs themselves, presumably in a CI Model table of some sort.
I would like to create a list of which classes have the 'Managed By Group' value set at the class level and which do not. Preferably with their location in the ci_cmdb hierarchy, but just the class name is fine if that's all that's easily available.
The obvious, cimodel and basic_info that are in the URL are not tables I can see, so I'm assuming the ciModel.do call is not to a standard form or one that is visible.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 03:47 PM
Hi
If I understand correctly, you are asking 2 questions:
1. What classes have the "managed_by_group" attribute?
2. For what classes is there a non-null "managed_by_group" value (for at least 1 record in the class)?
For (1), there are multiple places to check this, including:
- CI Class Manager
- sys_dictionary
- Tables & Columns
I think querying sys_dictionary is simplest here, so we can go to "sys_dictonary.list" to get the list of all columns in all tables. From there, searching for "managed_by_group" in the Column Name field shows that this column exists in cmdb_ci table. Given ServiceNow's hierarchical data model, this means _all_ children of cmdb_ci, which is to say all CI classes, have this attribute. But to also clarify, they are all the _same_ attribute, because they all extend/inherit from cmdb_ci.
So the net is: There is only one "managed_by_group" attribute, and it exists on cmdb_ci. All CI classes inherit this attribute.
For (2), the easiest thing to do would be to do "cmdb_ci.list". Make sure you have both "Class" and "Managed By Group" attributes on the form. Then, add a filter condition for Managed By Group != (empty). This shows all CIs with a populated Managed By Group attribute. Then, just Group By Class, and you will see the distinct list of all classes where at least 1 record has a non-empty Managed By Group attribute.
Hope this helps!
Regards,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 04:04 PM
Thanks for the quick response, Mike! I'm sorry I was not clear in the first draft, so I updated the description to note that what I am looking for is the value attached to the class itself, not on the CI level.
Of course, I'm assuming that this is still in a table somewhere because "Everything in SNow is a table or a column somewhere. . ." :^)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 04:43 PM
I believe the table you are looking for is cmdb_class_info. There is a managed_by_group attribute on this table (which I identified by doing the same "managed_by_group" search above, but omitting tables that started with cmdb_ci).
You should be able to query this table for non-empty values to find classes with Managed By Group set.
Regards,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 07:06 AM
If you are talking the value set in CI Class manager then that sets this table: cmdb_class_info
Keep in mind there is a business rule (CSDM Data Sync) that is responsible for a daily sync. So a record change may not populate on the class immediately. We put a business rule that look at the cmdb_class_info for any record INSERT and let the CSDM Data Sync handle updates. Also, if you have set a record as part of conditions for a Technical Service, the TSO definition takes precedence over the CI Class setting.
Another thing I noticed is that cmdb_class_info is not automatically populated with ALL the CMDB tables. If you need to do a bulk update, then you will have to write code to do that it appears.