Need to pull custom report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi All,
Greetings,
I need Application report from CMDB where we can see all the application along with its mapped servers.
The report should not have duplicate records like below where you same application mapping with same server multiple time: if is expected then please explain it.
Application | Servers | FQDN |
XYZ | aml00MMM | aml00MMM.corp.example.com |
XYZ | aml00MMM | aml00MMM.corp.example.com |
XYZ | aml00MMM | aml00MMM.corp.example.com |
XYZ | aml00MMM | aml00MMM.corp.example.com |
It is fine if the report is like below where multiple different applications are in same server which is normal thing.
Application | Servers | FQDN |
XYZ | aml00MMM | aml00MMM.corp.example.com |
ABC | aml00MMM | aml00MMM.corp.example.com |
MNO | aml00MMM | aml00MMM.corp.example.com |
POR | aml00MMM | aml00MMM.corp.example.com |
Could someone please help me in this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @kumaraj ,
1. As per my understanding why You’re Seeing Duplicates
* In CMDB, application-to-server mappings usually come from relationships in cmdb_rel_ci.
* If multiple relationship records exist between the same Application CI and the same Server CI (e.g., due to Discovery, Service Mapping, or manual creation), your report query will return duplicates.
* This can also happen if:
* The application is linked to both a cmdb_ci_server and its child cmdb_ci_computer
* The relationship is recorded multiple times with different relationship_type values.
2. Building the Report Without Duplicates using query builder.
Option A – Report Builder with Grouping
1. Table: Start from cmdb_rel_ci (Relationship table).
2. Conditions:
* Parent CI: Application classes only (cmdb_ci_appl, cmdb_ci_business_app, cmdb_ci_web_app, etc.).
* Child CI: Server class only (cmdb_ci_server or specific subclasses).
3. Add Related Fields:
* Parent → Name (Application)
* Child → Name (Server)
* Child → FQDN (from fqdn field in server CI)
4. In Report Settings:
* Use Aggregation or Group by: Application Name, Server Name, FQDN.
* This will collapse duplicate rows into a single unique combination.
5. Optional:
* Add a Count column if you want to see how many duplicate relationship records existed before grouping.
Option B – Use a Database View
If you want more control and potentially feed this into a dashboard or export:
1. Create a DB View:
* Join cmdb_rel_ci → cmdb_ci (parent) → cmdb_ci (child).
* Filter parent to Application classes, child to Server classes.
2. In the DB View definition, use DISTINCT on application_name, server_name, fqdn columns to remove duplicates at the SQL level.
3. Report on this DB view instead of the raw relationship table.
Option C – Clean Up CMDB Relationships
If duplicates are not expected:
* Use CMDB Health → Duplicate CI Relationships to identify and remove redundant relationships.
* Adjust Identification & Reconciliation (IRE) rules to avoid creating the same relationship multiple times from different data sources.
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thank You
AJ - TechTrek with AJ - ITOM Trainer
LinkedIn:- https://www.linkedin.com/in/ajay-kumar-66a91385/
YouTube:- https://www.youtube.com/@learnitomwithaj
Topmate:- https://topmate.io/aj_techtrekwithaj (Connect for 1-1 Session)
ServiceNow Community MVP 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi AJ, thanks for your valuable time. I have check one of the server's Related item section>upstream relationship where I see XYZ application mapped only once, so I guess the report should pull one one relationship but getting 4 relationships for same application. as you can see below. Rlationships which I have ticked with green.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @kumaraj ,
You need to select the relationship which relationship type you want to extract from Server to Application as different relationship type will be there for each application, Might be you only selected one relationship type where you can apply to see all relationship type or you can apply the filter based on specifics relationship type.
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thank You
AJ - TechTrek with AJ - ITOM Trainer
LinkedIn:- https://www.linkedin.com/in/ajay-kumar-66a91385/
YouTube:- https://www.youtube.com/@learnitomwithaj
Topmate:- https://topmate.io/aj_techtrekwithaj (Connect for 1-1 Session)
ServiceNow Community MVP 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @kumaraj
Try building a database view with distinct values or clean up duplicate relationships in CMDB, and your report will reflect the expected one-to-one mappings.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
Microsoft MVP (AI Services), India