CMDB Reporting of Parent -> Grandchild relationships

John_Lindsay
Kilo Explorer

We have a pretty standard CMDB set up with Applications having a number of Components which run on one or more servers. What I would like to be able to do is to create a report that lists all Applications dependant Servers.

There is no direct relationship between Application and Server set-up.

I have looked at the CI Relationship table and can report on Parent and Child components (ie list all the Applications and their respective Components), is there a way to list the Components children CIs and group by the Parent (ie the Application)?

3 REPLIES 3

carlob
Kilo Explorer

I am interested being able to run a this type of report / query too, but for multiple selected applications.
Were you ever successful with your efforts ?

Is anyone aware of how this can be achieved via View/Report and without using the online BSM map view ? One of the issues from View/Report may be specifying a way to limit the number of levels to drill down. The BSM view option has some controls for that, but I do not know how that can be done in View/Report.

Appreciate any advice


zschneider
Kilo Expert

You can create a relationship that dot walks. For example we have some custom forms on our asset so that the relationship is generated like u_asset_request --> sc_req_item --> alm_asset.

We have a relationship that Applies to u_asset_request and queries from alm_hardware that looks lik this:

current.addQuery('request_line.u_link_to_asset_request', parent.sys_id);
current.query();

This creates a related list on the u_asset_request of all alm_asset records with a sc_req_item parent that's related to the u_asset_request.

You could likely do the same thing in a business rule or report.


mbourla
Giga Guru

Not sure if I'm misunderstanding what you're looking for, John, but I have various requirements for reporting and processing that depend on looking up and down the relationship tree to an arbitrary depth. Basically, it's to know the Service CIs that are upstream from a given CI(s), or the CIs that are downstream from a given Service(s). There's OOTB code in the system that does this sort of thing, in the CIUtils script include. But that's not usable for ad-hoc reporting, and in any case is apparently going to be withdrawn soon. Copying an approach that BMC used to use for Remedy (which we were on prior to ServiceNow) I maintain a separate table of Service to CI relationships, which is regenerated each day. For each CI that's part of the BSM map for a Service CI, there's a record in that table. The scheduled script that generates it starts at the Service CIs, and recursively walks down the tree in cmdb_rel_ci, adding records to the new table. I'll soon be enhancing it to adjust the data in that table in real-time as CI relationships are added or deleted in cmdb_rel_ci.

That table can then be used in reports or scripts, where there's a need to see Service to CI relationships at any depth. I can also now add a related list on CIs to show the upstream Services that depend on that CI. It's basically showing the same information you see in the "flat" view in the Related Items part of a CI form, but in a way that can be used or processed in reports or scripts.

Of course that only gives Service to CI information, which is what I'm after, not arbitrary CI to CI information like you're after. Expanding it would mean that table holding lots more data, and taking much longer to generate. Or if you only have that specific requirement for Applications to their grandchildren Servers, you could use the same approach but starting at Applications instead of Services, and only logging Server CIs rather than any type of CI.

Don't know if that helps? Not exactly the same as you need, but similar!