Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Database view - ESX servers and dependencies

bigfissy
Tera Expert

Hi,

 

Created a view to list all ESX servers (from the cmdb_ci_esx_server table), connect it with the relationship table (cmdb_rel_ci ).

The objective is to get all the (1) ESX Servers, (2) their Vcenter Reference, and (3) business services (cmdb_ci_service)  that they depend on (depends on::used by).

 

The cmdb_ci_esx_server table already has attributes 1 and 2. The cmdb_rel_ci table has attribute 3.

How do I connect them in a view?

Please provide a screenshot showing all the where clause and left join if applicable 

1 ACCEPTED SOLUTION

Brad Bowman
Mega Patron

This depends on how you have things configured and relationships in your instance, but this should get you there, or close:

BradBowman_0-1699564148580.png

If you don't get any results, try rel_parent - in the event the ESX server is the parent instead of the child in your environment.  If you need to show other fields from the cmdb_ci_service table in your view, then you would need to add that as a third table, joined to cmdb_rel_ci on rel_parent.  With the left join on 200, this show all ESX servers, regardless if they have a business service.  If this is not what you intended, change the left join to false to only show ESX servers that have a business service. 

 

View solution in original post

1 REPLY 1

Brad Bowman
Mega Patron

This depends on how you have things configured and relationships in your instance, but this should get you there, or close:

BradBowman_0-1699564148580.png

If you don't get any results, try rel_parent - in the event the ESX server is the parent instead of the child in your environment.  If you need to show other fields from the cmdb_ci_service table in your view, then you would need to add that as a third table, joined to cmdb_rel_ci on rel_parent.  With the left join on 200, this show all ESX servers, regardless if they have a business service.  If this is not what you intended, change the left join to false to only show ESX servers that have a business service.