Azure Activity Alerts Rule

Microsoft.SystemCenter.MicrosoftAzure.AlertsMonitor.Insights.ActivityLog.Alert (Rule)

Azure Activity Alerts Rule.

Element properties:

TargetMicrosoft.SystemCenter.MicrosoftAzure.Insights.ActivityLogAlert
CategoryAlert
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SystemCenter.MicrosoftAzure.Insights.ActivityLogAlert.Alerts.Monitoring.DS Microsoft.SystemCenter.MicrosoftAzure.RunAsProfile.Proxy
CD ConditionDetection System.ExpressionFilter Default
CloseAlertsActivity WriteAction Microsoft.SystemCenter.MicrosoftAzure.CloseMetricAlert Default
GenerateAlertsActivity WriteAction Microsoft.SystemCenter.MicrosoftAzure.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SystemCenter.MicrosoftAzure.AlertsMonitor.Insights.ActivityLog.Alert" Target="Microsoft.SystemCenter.MicrosoftAzure.Insights.ActivityLogAlert" Enabled="true" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SystemCenter.MicrosoftAzure.Insights.ActivityLogAlert.Alerts.Monitoring.DS" RunAs="Microsoft.SystemCenter.MicrosoftAzure.RunAsProfile.Proxy">
<ADUserName>$RunAs[Name="Microsoft.SystemCenter.MicrosoftAzure.RunAsProfile.ADCredentials"]/UserName$</ADUserName>
<ADPassword>$RunAs[Name="Microsoft.SystemCenter.MicrosoftAzure.RunAsProfile.ADCredentials"]/Password$</ADPassword>
<ADClientId>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/ClientId$</ADClientId>
<SubscriptionId>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/SubscriptionId$</SubscriptionId>
<Proxy>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/ProxyServerAddress$</Proxy>
<AuthBaseAddress>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/Authority$</AuthBaseAddress>
<ResourceBaseAddress>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/ArmServiceUri$</ResourceBaseAddress>
<Audience>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/ResourceUri$</Audience>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>300</IntervalSeconds>
<MGName>$Target/ManagementGroup/Name$</MGName>
<TimeRange>720</TimeRange>
</DataSource>
</DataSources>
<ConditionDetection ID="CD" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='ResourceUri']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.AzureServiceGeneric"]/ServiceId$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<WriteActions>
<WriteAction ID="GenerateAlertsActivity" TypeID="Microsoft.SystemCenter.MicrosoftAzure.GenerateAlert">
<Priority>$Data/Property[@Name='Priority']$</Priority>
<Severity>$Data/Property[@Name='Severity']$</Severity>
</WriteAction>
<WriteAction ID="CloseAlertsActivity" TypeID="Microsoft.SystemCenter.MicrosoftAzure.CloseMetricAlert">
<TimeoutSeconds>300</TimeoutSeconds>
</WriteAction>
</WriteActions>
</Rule>