You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/update-manager/manage-pre-post-events.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,14 +33,15 @@ For example, if a maintenance schedule is set to start at **3:00 PM**, with the
33
33
34
34
|**Time**|**Details**|
35
35
|----------|-------------|
36
-
|2:19 PM | You can edit the machines and/or dynamically scope the machines up to 40 minutes before a scheduled patch run with an associated pre event. If any changes made to the resources attached to the schedule after this time, the resources will be included in the subsequent schedule run and not the current run. </br> **Note**</br> If you're creating a new schedule or editing an existing schedule with a pre event, you need at least 40 minutes prior to the maintenance window for the pre event to run. </br></br> In this example, if you have set a schedule at 3:00 PM, you can modify the scope 40 mins before the set time that is at, 2.19 PM. |
36
+
|2:19 PM | You can edit the machines and/or dynamically scope the machines up to 40 minutes before a scheduled patch run with an associated pre event. If any changes are made to the resources attached to the schedule after this time, the resources will be included in the subsequent schedule run and not the current run. </br> **Note**</br> If you're creating a new schedule or editing an existing schedule with a pre event, you need at least 40 minutes prior to the maintenance window for the pre event to run. </br></br> In this example, if you have set a schedule at 3:00 PM, you can modify the scope 40 mins before the set time that is at, 2.19 PM. |
37
37
|Between 2:20 to 2:30 PM | The pre event is triggered giving atleast 20 mins to complete before the patch installation begins to run. </br></br> In this example, the pre event is initiated between 2:20 to 2:30 PM.|
38
38
|2:50 PM | The pre event has atleast 20 mins to complete before the patch installation begins to run. </br> **Note** </br> - If the pre event continues to run beyond 20 mins, the patch installation goes ahead irrespective of the pre event run status. </br> - If you choose to cancel the current run, you can cancel using the cancelation API 10 mins before the schedule. In this example, by 2:50 PM you can cancel either from your script or Azure function code. </br> If cancelation API fails to get invoked or hasn't been set up, the patch installation proceeds to run. </br> </br> In this example, the pre event should complete the tasks by 2:50 PM. If you choose to cancel the current run, the latest time that you can invoke the cancelation API is by 2:50 PM. |
39
39
|3:00 PM | As defined in the maintenance configuration, the schedule gets triggered at the specified time. </br> In this example, the schedule is triggered at 3:00 PM. |
40
40
|6:55 PM | The post event gets triggered after the defined maintenance window completes. If you have defined a shorter maintenance window of 2 hrs, the post maintenance event will trigger after 2 hours and if the maintenance schedule is completed before the stipulated time of 2 hours that is, in 1 hr 50 mins, the post event will start. </br></br> In this example, if the maintenance window is set to the maximum, then by 6:55 PM the patch installation process is complete and if you have a shorter maintenance window, the patch installation process is completed by 5:00 PM. |
41
41
|7:15 PM| After the patch installation, the post event runs for 20 mins. </br>In this example, the post event is initiated at 6:55 PM and completed by 7:15 PM and if you have a shorter maintenance window, the post event is triggered at 5:00 PM and completed by 5:20 PM. |
42
42
43
-
Make sure to keep these pointers in mind when using this feature
43
+
44
+
We recommend that you are watchful of the following:
44
45
+ If you're creating a new schedule or editing an existing schedule with a pre event, you need at least 40 minutes prior to the start of maintenance window (3PM in the above example) for the pre event to run otherwise it will lead to auto-cancellation of the current scheduled run.
45
46
+ Pre event is triggered 30 minutes before the scheduled patch run giving pre event atleast 20 minutes to complete.
46
47
+ Post event runs immediately after the patch installation completes.
@@ -65,7 +66,7 @@ You can configure pre and post events on an existing schedule and can add multip
65
66
1. On the **Create Event Subscription** page, enter the following details:
66
67
- In the **Event Subscription Details** section, provide an appropriate name.
67
68
- Keep the schema as **Event Grid Schema**.
68
-
- In the **Topic Details**scetion, provide an appropriate name to the **System Topic Name**.
69
+
- In the **Topic Details**section, provide an appropriate name to the **System Topic Name**.
69
70
- In the **Event Types** section, **Filter to Event Types**, select the event types that you want to get pushed to the endpoint or destination. You can select between **Pre Maintenance Event** and **Post Maintenance Event**.
70
71
- In the **Endpoint details** section, select the endpoint where you want to receive the response from. It would help customers to trigger their pre or post event.
71
72
@@ -108,7 +109,7 @@ To delete pre and post events, follow these steps:
108
109
109
110
> [!NOTE]
110
111
> - If all the pre and post events are deleted from the maintenance configuration, System Topic gets automatically deleted from the EventGrid.
111
-
> -Avoid deleting System Topic manually from the EventGrid service.
112
+
> -We recommend that you avoid deleting the System Topic manually from the EventGrid service.
112
113
113
114
## Cancel a schedule from a pre event
114
115
@@ -140,15 +141,15 @@ The following query allows you to view the list of VMs for a given schedule or a
140
141
```kusto
141
142
maintenanceresources
142
143
| where type =~ "microsoft.maintenance/maintenanceconfigurations/applyupdates"
143
-
| where properties.correlationId has "/subscriptions/<your-s-id> /resourcegroups/<your-rg-id> /providers/microsoft.maintenance/maintenanceconfigurations/<mc-name> /providers/microsoft.maintenance/applyupdates/"
144
+
| where properties.correlationId has "/subscriptions/your-s-id/resourcegroups/your-rg-id/providers/microsoft.maintenance/maintenanceconfigurations/mc-name/providers/microsoft.maintenance/applyupdates/"
144
145
| order by name desc
145
146
```
146
147
147
148
:::image type="content" source="./media/manage-pre-post-events/cancelation-api-user-inline.png" alt-text="Screenshot for cancelation done by the user." lightbox="./media/manage-pre-post-events/cancelation-api-user-expanded.png" :::
148
149
149
-
+<your-s-id> : Subscription IDs in which maintenance configuration is created
150
-
+<your-rg-id> : Resource Group Name in which maintenance configuration is created
151
-
+<mc-name> : Name of maintenance configuration in pre event is created
150
+
+`your-s-id` : Subscription ID in which maintenance configuration with Pre or post event is created
151
+
+`your-rg-id` : Resource Group Name in which maintenance configuration is created
152
+
+`mc-name` : Name of maintenance configuration in pre event is created
152
153
153
154
If the maintenance job is canceled by the system due to any reason, the error message in the JSON is obtained from the Azure Resource Graph for the corresponding maintenance configuration would be **Maintenance schedule canceled due to internal platform failure**.
0 commit comments