Microsoft Azure Stack Auto Maintenance Mode Monitoring Rule

Microsoft.SystemCenter.AzureStack.Region.AutoMaintenanceMode.Rule (Rule)

The rule checks the update state of the regions within the configured interval. When updates are run on an Azure Stack region, the region is switched to maintenance mode in SCOM.

Knowledge Base article:

Summary

The rule checks the update state of the regions within the configured interval. When updates are run on an Azure Stack region, the region is switched to maintenance mode in SCOM. This allows avoiding autoclosed alerts on the portal to flow to SCOM and load the ticketing system with autoresolved issues. As soon as the updates are completed on the portal, the rule switches off the maintenance mode for the region in SCOM.

Element properties:

TargetMicrosoft.SystemCenter.AzureStack.Deployment
CategoryCustom
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SystemCenter.AzureStack.HostedRegion.On.Deployment.DS Default
Write WriteAction Microsoft.SystemCenter.AzureStack.Region.AutoMaintenanceMode.WA Default

Source Code:

<Rule ID="Microsoft.SystemCenter.AzureStack.Region.AutoMaintenanceMode.Rule" Enabled="true" Target="Microsoft.SystemCenter.AzureStack.Deployment" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Custom</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SystemCenter.AzureStack.HostedRegion.On.Deployment.DS">
<DeploymentId>$Target/Property[Type="Microsoft.SystemCenter.AzureStack.Deployment"]/EndpointUrl$</DeploymentId>
<TimeoutSeconds>60</TimeoutSeconds>
<IntervalSeconds>600</IntervalSeconds>
<ObjectDeploymentId>$Target/Id$</ObjectDeploymentId>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="Write" TypeID="Microsoft.SystemCenter.AzureStack.Region.AutoMaintenanceMode.WA">
<DeploymentId>$Target/Property[Type="Microsoft.SystemCenter.AzureStack.Deployment"]/EndpointUrl$</DeploymentId>
<TimeoutSeconds>30</TimeoutSeconds>
<DefaultRegion>$Target/Property[Type="Microsoft.SystemCenter.AzureStack.Deployment"]/Region$</DefaultRegion>
</WriteAction>
</WriteActions>
</Rule>