How to set multiple CIs in maintenance mode in one change request?

erlfos
Giga Expert

When we create a change request there is a Maintenance Rule ("CI in change window") which sets the CI in maintenance, and the CI shows up in the em_impact_maint_ci table. Any alerts from that CI will have the "Maintenance" flag set to true. Often when we create a change request it is for a job that affects multiple CIs, and when we create the change request we add one CI to the "Configuration Item" field of the change request, and the additional CIs are added to the "Affected CIs" (task_ci) table. This does not work with the standard Maintenance Rule "CI in change window", so only the CI added to the "Configuration Item" field in the change request is set in maintenance.

How can I make sure that all the CIs in the "Affected CIs" list for a change request are set in maintenance as well? I suspect I have to add a new maintenance rule, but I have not found a good solution for this. Any help is appreciated.

1 ACCEPTED SOLUTION

Ryan Zulli
ServiceNow Employee
ServiceNow Employee

Hi - this is not done out of box however by creating a new maintenance rule you can easily achieve what you are asking, take a look at the same pic below ::

find_real_file.png

Hope this helps.

Thanks,

-Ryan

View solution in original post

9 REPLIES 9

Hi
My Maintenance rule looks pretty much the same as yours, except for the "Schedule" field which is not present in my rule:

erlfos_0-1668154042093.png

 

Ricky15
Tera Contributor

HI there, I am having an issue here. The Task state doesn not have change request values instead the change_request table has all the state values. Does that mean we are set up incorrectly such that the states for change should be on the task table so we can dot walk ?

Where should we add the affected ci's list

Curious, does doing this or having a CI added to that table prevent an incident record from being generated if that CI is passed as the cmdb_ci value of a request to open an incident?

It depends if the flow (or some other process in ServiceNow) you use to create the incident is using this info. In the out of the box alert-to-incident subflow ServiceNow checks if the alert has 'Maintenance=true' which in turn depends on if the CI the alert originates from was added to this table.