Find cmdb_ci_server CIs missing Runs:Run_On relationship type

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2018 01:38 PM
As a non-administrative user, is there a way to determine a list of Server CIs that don't have a particular relationship type? We want to determine which servers are NOT related to another class of CI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2018 01:43 PM
Hello,
There are a couple ways of doing this, but the easiest is probably from the CMDB query builder that will allow you to report for things that are related or those that are not related (the other way would be via scripting).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2018 02:36 PM
You could run two different reports and then use Excel to compare the results.
1 - A report against the cmdb_ci_server table to compile the list of servers for which you want to determine if they have relationships (excluding any that are, for example, decommissioned)
2 - A report against the cmdb_rel_ci table (filtering on type is "runs on::runs" and that the child.class is each of the classes of servers in your environment - i.e. AIX Server, Linux Server, Windows Server etc). Make sure that the child name is the first column.
Export both lists and put in them into different tabs on the same Excel spreadsheet.
Run a Vlookup for each entry from your server report name field against the contents of the 2nd tab (I.e. Vlookup(A2,Sheet2!A:E,3,false). Anything that doesn't provide a result indicates there was not a relationship of the type you specified.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2018 07:06 AM
That is what I was doing, but was hoping to do it all within ServiceNow