CMDB — Servers connected to a database
Use this example to build a CMDB query to find all servers with a connection to a database.
시작하기 전에
Role required: none
프로시저
- Navigate to All > Configuration > CMDB Query Builder.
- Select Create new and then enter a name, for example All servers with a connection to a DB.
- Choose CMDB Query and then select Create.
-
In the CMDB Classes list, locate the Server class and drag it to the canvas.
팁:Use the search box to find items quickly.
- Locate the Database class, and place it to the right of the Server class node on the canvas.
- Select at the center of the right side of Server, and then at the center of the left side of Database to create a connection line between the two class nodes.
- Select once or twice on the connection line until the Connection Properties panel appears in the sidebar.
-
In the Relationship Types and Related Items section, select Add Relationship Types and add all the relationships from the list.
Settings in the Relationship Direction section reflect the parent-child direction in the relationship. If the Database class is the parent in the relationship, then the Parent and Child settings are switched.
- Select Save, and then select Saved Queries on the left to see the widget for the saved query.
- Select the query widget to return to the canvas in edit mode.
-
Select Run to execute the query.
Review the query results. Each row displays the name of a server CI, the name of a database CI, and the relationship type between them.
-
Add columns to the query results.
- Select the Server 1 node on the canvas once or twice so that the Server 1 Report Columns section appears in the right-side pane.
- Select Add Columns.
- Select Manufacturer and then select outside the columns list to close it.
-
Select Run.
The query results now include the Manufacturer column.
- Select Save again to save your customization for this query.