Application Services: Tips and Tricks
In my previous Community Article Application Services: How to use them? I have described usage of Mapped and Calculated Application Services. In this article I will focus on useful tips and tricks:
- How to control what Configuration Item classes are imported
- How to improve CI Relations in the form view and BSM view
Limit Configuration Item classes imported
There few classes excluded from the import to the Application Service:
- cmdb_ci_endpoint
- cmdb_ci_translation_rule
- cmdb_ci_config_file
- cmdb_ci_qualifier
- cmdb_ci_application_cluster
In a large implementations, especially when Discovery is enabled, there are many various Configuration Item classes used. Not all of them are actually needed to be imported to the Service Map. Also, there are few scenarios where exclusion of a Configuration Item class is needed to prevent "explosion" of the Service Map. Example is DataCenter class ... it may happen that e.g. VMware Instance depends on the DataCenter. But at the same time DataStore class makes a "triangle" that leads to a situation where VMware Instance has DataCenter as a child and through the DataStore as a parent. Import of such a "triangle" situation lead to very large maps being created and therefore impact the performance.
What you can do in this situation?
- You can limit the amount of relationship levels being imported either by adjusting the global property "svc.manual.convert.levels.default_value" or adding JSON string {"levels" : } to the "metadata" attribute of the Calculated Application Service ("metadata" attribute exists for Calculated Application Service only)
- You can exclude defined Configuration Item classes from being imported. Such classes needs to be defined in the "sa.mapping.user.manual.citype.blacklist" property. This property works with extensions, it means adding cmdb_ci_server will exclude all child classes for Windows, Unix etc.
In practise, you may combine both approaches. Set a good default value based on your size of CMDB relationships and use individual "metadata" attributes as an override.
Improvement of CI Relations in the form view and BSM view
From the historical point of view the current Application Services come from the Service Mapping product. Service Maps are drawn based on the endpoints. During the import of relationships into the Application Service system at first create endpoints (Manual Endpoint - cmdb_ci_endpoint) followed by creation of CI Associations.
You may see the endpoints in the CI Relations and BSM view as well. This is needed for the situation when you populate the Application Service using the Service Mapping. Service Mapping does not create relationships, only endpoints and CI Associations. Therefore, both relationships and endpoints are displayed in the CI Relations and BSM View.
The following screenshot shows how the endpoints are displayed in the CI Relations.
As the endpoint-based relationships actually duplicate the "normal" relationships (for non-Service Mapping populated Application Services), this view may be confusing of the users. You may decide to hide endpoint-based relationships. Warning: you should do this only when you do not have Service Mapping deployed!
Hiding the endpoint-based relationships does not require any development. Navigate to menu Configuration => Relationships => Relationship Type Exclusion List [cmdb_rel_filter] and add 2 records into this table as shown on the screenshot below.
As a result, both CI Relations and BSM view will use only "normal" relationships and ignore the endpoint-based ones. The screenshot below shows the same example as above, after the exclusion records were created.
https://www.servicenow.com/community/common-service-data-model/application-services-tips-and-tricks/ta-p/2309696