Microsoft Azure Stack Hub Auto Maintenance Mode Monitoring Rule for Scale Unit Node

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

The rule checks the state of the scale unit nodes within the configured interval. When maintenance mode is active on a scale unit node, the node is switched to maintenance mode in SCOM.

Knowledge Base article:

Summary

The rule checks the scale unit node state within the configured interval. When scale unit node is under maintenance the node is switched to maintenance mode in SCOM.

Element properties:

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

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SystemCenter.AzureStack.HostedUnitNodes.On.ScaleUnit.DS Default
Write WriteAction Microsoft.SystemCenter.AzureStack.UnitNode.AutoMaintenanceMode.WA Default

Source Code:

<Rule ID="Microsoft.SystemCenter.AzureStack.UnitNode.AutoMaintenanceMode.Rule" Enabled="true" Target="Microsoft.SystemCenter.AzureStack.ScaleUnit" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Custom</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SystemCenter.AzureStack.HostedUnitNodes.On.ScaleUnit.DS">
<DeploymentId>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.AzureStack.Deployment"]/EndpointUrl$</DeploymentId>
<TimeoutSeconds>60</TimeoutSeconds>
<IntervalSeconds>600</IntervalSeconds>
<DefaultRegion>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.AzureStack.Deployment"]/Region$</DefaultRegion>
<RegionId>$Target/Host/Property[Type="Microsoft.SystemCenter.AzureStack.Region"]/RegionId$</RegionId>
<ScaleUnitObjectId>$Target/Id$</ScaleUnitObjectId>
<ScaleUnitId>$Target/Property[Type="Microsoft.SystemCenter.AzureStack.ScaleUnit"]/ScaleUnitId$</ScaleUnitId>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="Write" TypeID="Microsoft.SystemCenter.AzureStack.UnitNode.AutoMaintenanceMode.WA">
<DeploymentId>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.AzureStack.Deployment"]/EndpointUrl$</DeploymentId>
<TimeoutSeconds>60</TimeoutSeconds>
<DefaultRegion>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.AzureStack.Deployment"]/Region$</DefaultRegion>
<RegionId>$Target/Host/Property[Type="Microsoft.SystemCenter.AzureStack.Region"]/RegionId$</RegionId>
<RegionName>$Target/Host/Property[Type="Microsoft.SystemCenter.AzureStack.Region"]/Name$</RegionName>
<ScaleUnitId>$Target/Property[Type="Microsoft.SystemCenter.AzureStack.ScaleUnit"]/ScaleUnitId$</ScaleUnitId>
</WriteAction>
</WriteActions>
</Rule>