Grouping of Configuration Items

cricket1
Kilo Explorer

Hi to all...Happy New Year 2010!!! I want to know how to group related configuration items so that once i raise change request to the group(a new field to be added in CR) it should automatically get reflected in all those CIs...For eg. There are 30 HP servers. If an update has to be installed on all HP servers, the requester should select the group consisting of all 30 HP servers instead of selecting individual HP server in the Change Request form...Plz help me out in this issue... Thanks...

2 REPLIES 2

brozi
ServiceNow Employee
ServiceNow Employee

This sounds interesting, before you start down the path one option may be to review this plugin. It may give you ideas and or additional help in build your functionality.

http://wiki.service-now.com/index.php?title=Best_Practice_-_Bulk_CI_Changes_Plugin

As far as grouping CI's, we have a few options. You do have the table structure which does separate them, so servers are on one table or even windows servers are on one, and solaris servers are on another. You may need to be more granular.

To do the grouping, you could create a new table called CI Groups or something similar. Then you would create the new CI group field on you cmdb_ci table (if you want to use this grouping for all ci's). After that you would want to create a many-to-many list from your CI Group table to your CI (cmdb_ci) table. This will allow it to work similar to users and groups.

More here: http://wiki.service-now.com/index.php?title=Creating_a_Many-to-Many_Relationship

Lastly once you select the group in the change request you will want to add those in the group to I assume the affected CI list. Do that via BR or UI Action on the change table.

Here is an example of what that might look like, of course this may be different based on that names of the fields and tables you create so you will have to test and adjust this script.



var chg = current.sys_id;
var gr = new GlideRecord("m2mtable");
gr.addQuery("CI Group", current.u_ci_group);
gr.query();
while (gr.next()) {
// We found one, add to the affected CI list
var affCI = new GlideRecord("task_ci");
affCI.ci_item = gr.u_ci_group;
affCI.task = chg;
affCI.update();
}


I would start by looking at the article I pointed you towards and see if that may meet your needs or give you some of the functionality and maybe they other part of what i posted will fill in the rest or give you ideas on build the rest.





thanks a lot brozi...i am working on this and il get back to u soon...