How can I see the Application Services and Business Applications that a CI supports?

Matt Jones3
Tera Expert

We've been starting to populate our CMDB, starting at the bottom (servers, routers, switches, phones, etc.), the Configure Items piece of the Manage Technical Services area of the CSDM.

 

At this point, we want to start moving "up", and start grouping these CIs in a more meaningful way.  I stared playing around with creating Business Applications and Application Services (based on dynamic CI groups).  This works OK to be able to see the underlying infrastructure that supports a Business Application.  However, the other way isn't working.  When looking at a particular CI (say, a server), I'm not seeing a way to see the Application Service that the CI is supporting.

 

I'm not 100% sure I'm modeling this correctly.  Trying to understand the CSDM...  Tried to google this, but I'm not finding anything relevant.  I gotta believe I'm just doing something simple wrong, but haven't been able to figure out what yet.

1 ACCEPTED SOLUTION

Bryan Graham1
Tera Expert

Hey Matt,

Had a similar query / requirement. We're actually setting the Business Service on the Incident form based on a selected CI. Found I had to write a script to create the CI Relationship records from the CI to the App Svc to be able to traverse the link.

HTH,

Bryan

var groupID = '1dc09f481b447910e14898e7b04bcbf0'; // The CMDB Group the Dynamic group is based on
var appSvcID = 'f5b6649e1b843190e14898e7b04bcbfc'; // The App Svc to have all the CI's related to
var ciArray = getDynamicGroupCIs(groupID);
for (i = 0; i < ciArray.length; i++) {
    var ciRel = new GlideRecord('cmdb_rel_ci');
    ciRel.initialize();
    ciRel.setValue('parent', appSvcID);
    ciRel.setValue('type', '55c95bf6c0a8010e0118ec7056ebc54d') //Contains::Contained by
    ciRel.setValue('child', ciArray[i]);
    ciRel.insert();
}

function getDynamicGroupCIs(groupSysId) {
    var parser = new JSONParser();
    var response = sn_cmdbgroup.CMDBGroupAPI.getAllCI(groupSysId, false);
    var parsed = parser.parse(response);
    if (parsed.result) {
        gs.print("Success retrieving CI list: " + parsed.idList);
        return parsed.idList;
    } else {
        gs.print("Failed to retrieve list, errors: " + JSON.stringify(parsed.errors));
        return null;
    }
}

 

View solution in original post

12 REPLIES 12

Niklas Peterson
Mega Sage
Mega Sage

Hi,

For an Application Service of the Dynamic CI Group type you can see the relation between the Application Service and the contained CIs in the svc_ci_assoc table. This table can be added as a related list on the server form.

Other Application Service types have access to  the Service Map which makes it easier to see the hierachic structure of the contained CIs.

 

Regards,
Niklas

Hmmm, not quite what I was hoping for.  Is it not possible to see Application Services based on dynamic CI groups in the CI Relations Formatter, as other relationships between CIs are shown?

Hi,

Unfortunately not, then you would need something custom like @Bryan Graham1 suggests. More advanced Application Services that uses Service Mapping have the Service Map which is displaying the hierarchy of the contained CIs. But this is not the same as the CI Relationships which shows dependencies between CI.

Dependencies (CI Relationships) can be used to build Application Services like with traversal rules for Tag based Service Mapping. Which means the dependencies (CI Relationships) needs to be created first, not the other way around.

Regards,
Niklas

Riya Verma
Kilo Sage
Kilo Sage

Hi @Matt Jones3 ,

 

Hope you are doing great.

 

To address the issue of not being able to view the Application Service associated with a specific CI, there are a few steps you can take:

  1. Ensure that you have properly defined the relationships between the CIs and the Business Applications/Application Services. You need to establish a relationship where each CI is associated with the appropriate Application Service.

  2. Verify that the CI records have been accurately populated with the necessary information. Double-check that the CI records have the correct references to the corresponding Business Applications and Application Services.

  3. Once the relationships and CI records are properly set up, you can create a user-friendly interface within ServiceNow to view the Application Service associated with a particular CI. This can be achieved by customizing the CI form or creating a related list that displays the relevant Application Service information.

 
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma